[rabbitmq-discuss] MYSQL not getting disconnected Consumer

reddylast reddylast at gmail.com
Wed Mar 20 19:39:35 GMT 2013


Hi,

I've recently started to work on RabbitMQ. I'm using rabbitmq to fulfill
cronjob like mechanism. I have a jobs table (in mysql) which have fields :
id, status, category, start_time and end_time. The producer script reads all
the records from jobs table which have status='queued' and then push them to
multiple rabbitmq queues (according to the category). Now at consumer site
my script read those jobs from the rabbitmq queues and do some processing
and updates status='in-progress' and start_time=CURRENT_TIME() in DB. Once
consumer script finish all processing the jobs table is updated with
status='completed' and end_time=CURRENT_TIME and also sends acknowledgment.

So far everything works fine, but, one thing I've noticed is that consumer
script never kills mysql threads/processes, even if I close mysql connection
after executing each query. In this way it generate "too many connections"
error.

In Idea ? where is the exact problem exits ?

Thanks
Reddy



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/MYSQL-not-getting-disconnected-Consumer-tp25619.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list