Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails delayed_job memory consumption problem

We're having huge problems with the delayed_job plugin - http://github.com/collectiveidea/delayed_job/

When we start tasks with "ruby script/delayed_job start", the process never lets go of RAM it acquires.

So it starts with 10%, 25%, gets to 80% and never lets go of the ram, even if it has no jobs to process.

Any ideas how we can get over this?

Thanks!

(PS: RAILS_ENV=production script/delayed_job start didn't work for us to start the delayed_job worker)

like image 398
stringo0 Avatar asked Oct 20 '10 16:10

stringo0


1 Answers

Based on advice from IRC (from @ReinH), Ruby will never free memory back to the OS.

So the only solution I know of right now is to manually restart the delayed_job plugin every now and then.

@ReinH also pointed out the delayed_job_spawner plugin, which seems to be another plausible solution - http://github.com/woahdae/delayed_job_spawner

like image 185
stringo0 Avatar answered Nov 16 '22 16:11

stringo0