crono icon indicating copy to clipboard operation
crono copied to clipboard

Crono memory footprint

Open usui1 opened this issue 9 years ago • 1 comments

Crono consumes about 100 MB of RAM at startup. Over time it consumes much more of it. I have a process that read about 4MB XML file, parse it and store some data from it to the database. I run it every 5 minutes. After the first script run, crono consumes about 320MB RAM, second run an crono consumes about 700 MB RAM. After couple more runs I got to over 1 GB of RAM consumed by crono and about 50 MB RAM free. My server got a bit slow because of this. Also tried to run this on heroku and got a lot of memory warnings.

I've managed to work-out a partial solution:, I fork the process at the beginning of the job 'process' method so Ruby creates a new process with my task. This new process also takes up about 320 MB RAM while running but when it finishes, the RAM is free again. This is ok for me but still the Crono process takes up about 100 MB on startup and this amount slowly rizes (couple of MB each job run). After 24h Crono consumes about 500 MB RAM now.

I've tried to read about the memory management in Ruby but no luck to fix this. Any ideas to make this memory footprint stable?

usui1 avatar Jan 25 '16 09:01 usui1

I am also suffering from this issue. My crono process on Heroku gets to a point where it triggers an error Error R14 (Memory quota exceeded) after a while, even though my rails application is completely idle.

Would love to hear something from the authors/contributors, to understand if there is a chance for a fix or a workaround.

crono

DannyBen avatar Apr 15 '16 07:04 DannyBen