[rabbitmq-discuss] MYSQL not getting disconnected Consumer
Tim Watson
tim at rabbitmq.com
Mon Mar 25 13:46:24 GMT 2013
Hi,
On 25 Mar 2013, at 13:15, reddylast wrote:
> Thanks for you reply.
>
You're welcome.
> I posted this issues also on MySQL support forums and Stack Overflow, but,
> didn’t get any solution. Please see the samle code of consumer script which
> have right now, hope this will help you to get an idea on this issue :
>
Perhaps I wasn't clear. I advised you to try out the MySQL forums and SO because those are the right places for you to get help with MySQL issues. The RabbitMQ mailing list is not the right place to address this problem. If there was something going on with your RabbitMQ connection/queue/channel/etc then this *would* be a good place to come and get help - and we'd be happy to give it! - but your issue is afaict with MySQL connection handling/cleanup and that is nothing to do with RabbitMQ, ergo this is not the right mailing list to ask for help, hence my suggestion to go somewhere more appropriate.
If you've not heard back from the support forums or SO then I can only suggest that you either continue to wait for a reply, or poke the question(s) again and ask if anyone's able to help. You may find that rephrasing your question or adding additional details helps - the canonical advise given to those seeking help on the internet is http://www.catb.org/esr/faqs/smart-questions.html#intro and is vital reading if you're not already familiar with it.
> $db->mysqlConnect();
> $db->mysqlQuery(...);
> $db->mysqlDisconnect();
>
> processData($data); // this will process data
>
> $db->mysqlConnect();
> $db->mysqlQuery(...);
> $db->mysqlDisconnect();
>
> };
That section of code looks rather suspicious to me - but I know next to nothing about MySQL. I do *not* want to discourage you from asking for help here, because when it comes to questions about RabbitMQ, we're always happy to assist users both on this mailing list and on the #rabbitmq IRC channel on freenode. But if your question has nothing to do with RabbitMQ, this is not the right forum. If you suspect that RabbitMQ is at fault, then why not rewrite the script to execute the MySQL code in a tight loop using some pre-populated array of test json data and take a look if the connection cleanup is still failing without RabbitMQ being involved? If so, then you know it's nothing to do with rabbit. If the problem goes away, then it's possible that some aspect of the client library you're using (such as, for example, running callbacks in different threads or error handling mechanisms) is interacting with the MySQL code in an unhelpful manner. If that (latter situation) can be proved, then you might try contacting the author of your rabbitmq client library and asking them for help. That *is* something you can use this list for, although there's no guarantee that all client library authors follow this list, and mailing the author directly or using the project issue tracker (for the client library) might be a better approach.
HTH - as I said, *please* don't be discouraged from approaching this list for help, once you're certain that your issue actually has something to do with RabbitMQ (rather than MySQL or some other unrelated technology).
Cheers,
Tim
More information about the rabbitmq-discuss
mailing list