Skip to content
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

scheduler can NOT enqueue job correctly sometimes #633

Open
ceshihao opened this issue Jan 16, 2018 · 5 comments
Open

scheduler can NOT enqueue job correctly sometimes #633

ceshihao opened this issue Jan 16, 2018 · 5 comments

Comments

@ceshihao
Copy link

ceshihao commented Jan 16, 2018

I use resque-scheduler v4.0.0

Recently, my resque scheduler can NOT enqueue jobs correctly sometimes.
There are 3 phenomenons, but i can NOT find root cause so far.

  1. Sometimes, all scheduled jobs can NOT be enqueued automatically, but they can be triggered from resque web.
  2. Sometimes, some of jobs can be enqueued automatically, but some are not.
  3. Sometimes, all jobs work correctly.

I have some hints but not sure.

  • dynamic schedule is enabled.
  • I have 2 scheduler for HA.
@carsonreinke
Copy link
Contributor

@ceshihao Well that is concerning.

In the resque-web, do you see all the scheduled jobs?

@ceshihao
Copy link
Author

ceshihao commented Feb 1, 2018

I found it was because of an incompatible problem between static and dynamic schedules.

  • Previously, I use static scheduler and load the schedules from a yaml. It works and No schdule lost.

  • Recently, I try to use dynamic one. However, dynamic scheduler thinks the schedules are temporary ones if NOT set persist = true. Therefore, when one scheduler is killed for some reason, original static ones are cleared (v4.0.0 behavior).

@carsonreinke
Copy link
Contributor

@ceshihao It seems like changing the default to persist: true would make the most sense and prevent the issue you had in the future?

@ceshihao
Copy link
Author

ceshihao commented Feb 2, 2018

Yes, I think so.

BTW
I find resque-scheduler consuming memory increases a lot according to the number of schedules.

In my case, I have ~30 schedules after migrated to dynamic scheduler (the number may increase a little because dynamic), and the scheduler consumes ~500 MB memory.

I did NOT suppose it consumes so many memory for just cron schedulers.

@carsonreinke
Do you have any experience on scheduler memory consuming?

@carsonreinke
Copy link
Contributor

@ceshihao I think that is more or less Ruby, but that is virtual, not real memory. Tweaking the Ruby VM garbage collection settings might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants