2

I am running sidekiq jobs on a few models (ARs). Sometimes, sporadically, I am getting exceptions of nil models. That is, the models (which can be very old in the DB) are nil. I have IF conditions before the job to allow only when NOT nil, the code passes, but sometimes it gets the nil somewhere in the code.

I do not have reaping policy (using the default) in the database.yml, thus I am not sure why this is happening.

When I am retrying the jobs (even after a few seconds) - they succeed.

What can cause this break inside the job???

Thanks

Himberjack
  • 5,682
  • 18
  • 71
  • 115
  • What database are you using? Also please show code of your Active Job workers. If you using MySQL it can happens on this error: http://stackoverflow.com/questions/100631/mysql-server-has-gone-away-with-ruby-on-rails – stepozer Apr 19 '16 at 16:02
  • @stepozer - Postgres. But its only happens on sidekiq. There is nothing special in the code. its something like model = something; if !model.nil?; model.id; end -> model.id will claim there is no id on nilclass – Himberjack Apr 20 '16 at 04:46

0 Answers0