-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increased memory use when using bin/jobs
to start Solid Queue?
#405
Comments
Huh, that's indeed puzzling! May I ask what's your Solid Queue configuration? And whether you have |
Here's my Solid Queue configuration: # config/queue.yml
default: &default
dispatchers:
- polling_interval: 1
batch_size: 500
workers:
- queues: [ login, background, default ]
threads: 3
processes: 1
polling_interval: 0.1
development:
<<: *default
test:
<<: *default
staging:
<<: *default
production:
<<: *default
# config/recurring.yml
one:
class: JobOne
schedule: every 5 minutes
two:
class: JobTwo
schedule: every 75 minutes
solid_queue_cleanup:
command: "SolidQueue::Job.clear_finished_in_batches"
schedule: every day at 3 am
queue: background I don't have |
Thanks so much for sending that.
Yes, that's right. I'm quite puzzled in any case, about this behaviour... But I wonder if, in your case, eager loading is causing that extra memory to be used in the beginning 😕 Would you be up to do a quick test if you can do that without running into trouble with your Heroku instance? That'd be setting
and then checking to see the memory usage invoking Solid Queue with |
Sorry for the delay and thanks for trying that out 🙏 My only guess right now is that it might be because of eager loading the whole app instead of auto-loading. In theory, eager-loading the whole app before forking should help with memory used in total by all processes, but in this case you only have 3 processes and perhaps having them auto-load stuff when they use it instead of eager-loading everything uses less memory. I'm going to do some tests with our app to see if this makes sense, but it's my only guess right now 🤔 |
Thank you for looking into this @rosa! I'll switch back to using the Rake task to start Solid Queue, but please let me know if you end up finding anything during your testing. |
I'm working on a project that was using Solid Queue v0.7.0 and using
bundle exec rake solid_queue:start
to start the process. When I updated to v1.0.0 last week, I also changed the command to start Solid Queue to usebin/jobs
per current documentation.I noticed that the memory use of the associated Heroku app was greatly increased. I wasn't sure if this was due to updating the gem or changing the start command, so I tried changing back the command from
bin/jobs
to the Rake task and have noticed a decrease in memory use, per screenshot below.I read in the discussion on #343 that using
bin/jobs
is supposed to help with memory use thanks to eager loading, so I'm a bit puzzled by this situation.The text was updated successfully, but these errors were encountered: