I’m using RailsCron, and it’s working out very well for me. However,
I’m having one problem right now.
I use the acts_as_background on one of my model objects. In order to
get it to add the cron job to the table, I have to make sure the model
is loaded in environment.rb.
However, I’m running 2-3 fcgi process on my server. Most of the time
when I start lighty, I get a mysql deadlock error as the
acts_as_background tries to delete and re-add itself to the rails_cron
`log’: Mysql::Error: Deadlock found when trying to get lock; try
restarting transaction: DELETE FROM rails_crons
How can I get around this? As I understand it, each fcgi starts up
it’s own environment, so each it trying to add the acts_as_background
tasks to the database, and they are deadlocking each other.
Great plugin by the way - much prefer using it to normal cron!