Sidekiq memory usage reset

I have a Rails application that uses Sidekiq for a background process. To deploy this application, I use the capistrano, ubuntu and apache server. To start and restart Sidekiq, I use the capistrano-sidekiq gem. My problem is when Sidekiq is running, the amount of memory (RAM) used by Sidekiq is increasing. And when Sidekiq finished all the processes (workers), it holds a large amount of RAM and does not overwrite it.

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
ubuntu    2035 67.6 45.4 3630724 1838232 ?     Sl   10:03 133:59 sidekiq 3.5.0 my_app [0 of 25 busy]     

How to make Sidekiq in reset usable memory after workers finished their work?

+4
source share
1 answer

Sidekiq . , . , , Sidekiq Ruby.

Resque , , , , , .

Sidekiq - Resque.

.

:

class Job
  include Process

  def perform
    pid = fork do
      # your code
    end
    waitpid(pid)
  end
end
+6

Source: https://habr.com/ru/post/1605725/


All Articles