In the ‘Goodbye Sidetiq’ discussion, user sam announced the replacement of the Sidetiq scheduler due to high CPU usage and design flaws causing network saturation across hosted sites. Sam introduced a new lightweight scheduler with an improved UI 3 and warned users to report any issues. While some users praised the new interface 4, others reported critical bugs, including an ‘Internal Server Error’ on the scheduler page 14.
Troubleshooting revealed a sorting error in lib/scheduler/web.rb when comparing Class objects, which sam fixed. User michaeld eventually discovered the root cause of the initialization failure was a flushdb command in their startup script that was wiping Redis keys needed for the new scheduler 36.
Additionally, the thread covered the transition from non-Docker to Docker installations 11, the extraction of the scheduler into a standalone library 6, and the release of Backup/Restore features 41. User Lee_Ars encountered issues with grayed-out Restore buttons, which were resolved by enabling the allow_restore site setting 43.
We have been working to address them upstream, however even once addressed there are some design issues that we need fixed as well.
Recently, I was debugging erratic perf issue with @supermathie here and found a second serious issue.
Sidetiq always schedules every job at exactly the same time, this leads to periods where the same job on every site we host runs at the same time leading to network saturation.
I have been building a light weight scheduler to address the perf and scheduling issues. I expect to have it done today.
So, this is just an upfront warning that the scheduler is changing, if you notice any new issues with scheduled jobs please let me know.
Yes. We also want to have a “howto convert from regular to Docker install” posted soon. @sam has done a number of conversions from old-style Discourse install to new Docker installs now and has documented the process internally.
@zogstrip and @sam are working on necessary import/export improvements and once that is ready, it should go up.
Hitting the ‘Trigger’ button on for instance ‘Version Checks’ results in a screen showing “Internal Server Error” and this in the logs:
ArgumentError - comparison of Class with Class failed:
/var/www/discourse/lib/scheduler/web.rb:10:in `sort'
/var/www/discourse/lib/scheduler/web.rb:10:in `block (2 levels) in registered'
/var/www/discourse/vendor/gems/rails_multisite/lib/rails_multisite/connection_management.rb:45:in `with_connection'
/var/www/discourse/lib/scheduler/web.rb:8:in `block in registered'
From that moment on, the scheduler screen is broken (keeps showing ‘Internal Server Error’ until Sidekiq is restarted.
is there anything custom in your initializer, you are going to need to trace through the sidekiq initializer to see why its not doing an initial enqueue of the jobs
Removing the key “default:_scheduler_Jobs::VersionCheck” fixes the Internal Server Error
127.0.0.1:6379> get "default:_scheduler_Jobs::VersionCheck"
"{\"next_run\":1391979510,\"prev_run\":1391893854,\"prev_duration\":327,\"prev_result\":\"OK\"}"
127.0.0.1:6379> del "default:_scheduler_Jobs::VersionCheck"
(integer) 1