collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.82k stars 954 forks source link

Error while reserving job ... Timeout occurred - when running in production, not in development #656

Closed mbedalov closed 10 years ago

mbedalov commented 10 years ago

I am using SQLAnywhere for my Adapter, and I have delayed_job working fine in development. However, when switching to production mode, the worker process is never able to reserve a job. After doing some debugging, I've found that the Delayed::Job::reserve() method is failing when it (indirectly) calls the ActiveRecord::ConnectionAdapters::SQLAnywhereAdapter::connect! method.

In the delayed_job.log file, I am seeing the following message: Error while reserving job: [-832, "Connection error: Timeout occurred while waiting for connection response\n"]: Cannot Establish Connection

I have verified that the connection string that is used between development and production modes is identical, so I am a little at a loss as to what would cause it to timeout in production mode.

I can provide a complete call stack if that would be helpful.

albus522 commented 10 years ago

This sounds like an issue with SQLAnywhere and not DJ