We recently switched our (ruby) job queuing system from DelayedJob to Resque.
While our latency has decreased and we have eliminated the bottleneck in the database, we now see a new problem; one or more of our employees seems to leave the database connection open when it leaves. When we look at the list of processes, there are hundreds of connections in a state of "sleep". They eventually lose time after 90 seconds. We forced our employees to support the work of clients, but we really need to find that one (or more) of our work is not polite when it is disabled using the ruby mysql2 client.
Any ideas on how we could (1) find the culprits or (2) measure our code so that we can make sure that we are actually disconnected before the task is completed?
- Rails 4.0.x
- Resque 1.25.2
- mysql2 gem 0.3.16
source
share