• Kirill Smelkov's avatar
    gitlab: Setup sidekiq service · 4c127fdd
    Kirill Smelkov authored
    Sidekiq[1] is used in GitLab as background jobs manager - i.e. if a
    request handler needs to spawn some non-light job - it adds it to
    sidekiq queue (in Redis) and relies on sidekiq service to later pick
    this job up and execute it.
    
    The service is setup with just to run bin/gitlab-sidekiq with
    appropriate queues (extracted from omnibus-gitlab) and appropriate
    settings to controlling GitLab's sidekiq Out-Of-Memory killer[2].
    
    NOTE Unlike unicorn OOM killer, Sidekiq memory killer just makes sidekiq
        processes to be SIGKILL terminated and relies on managing service to
        restart it. In slapos we don't have mechanism to set autorestart=true,
        nor bang/watchdog currently work with slapproxy, so we setup to do
        such monitoring ourselves manually with here-introduced
        watcher-sigkill program.
    
    NOTE2 sidekiq promise, because it is rake/gitlab based, is slow to
        load/run and thus is put into etc/promise.slow/
    
    [1] http://sidekiq.org/
    [2] https://gitlab.com/gitlab-org/gitlab-ce/blob/1322bd78/doc/operations/sidekiq_memory_killer.md
    
    /cc @kazuhiko, @jerome
    4c127fdd
watcher-sigkill.in 1.01 KB