Sidekiq Memory Killer will always kill a large import
When importing a large project, the git
process can spawn and easily use more than 1+ GB RAM, tripping the Sidekiq memory killer.
Workaround
The workaround is to disable the memory killer:
gitlab_rails['env'] = {
'SIDEKIQ_MEMORY_KILLER_MAX_RSS' => '0'
}
This isn't a good experience and causes the importer to fail in odd ways if the repository fails to import. Some ideas:
- We whitelist certain processes (e.g.
git
) from the total RSS calculation. - We extend the grace period (now: 15 minutes) for when Sidekiq actually goes down.
Direction
We are redesigning Sidekiq Memory Killer to allow it to balloon for much higher memory usage for problematic workers.
We also make Memory Killer to recover from blowing kill fuse, if the memory usage recovers.
This is being done as part of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32469.
Edited by Kamil Trzciński