View Full Version : MYSQL error: Communications link failure Last packet sent to the server was 0 ms ag

December 22nd, 2010, 09:15 AM
I received an error this morning on my Hostek-hosted site. We use Coldfusion and MYSQL.

I accessed one of our web pages, left it for about 20 minutes, came back and refreshed, and got this error on one of my inline queries:

"Communications link failure Last packet sent to the server was 0 ms ago"

I refreshed the page and the error went away, but I have a concern that this will come up again for our site users (thankfully we are in development and not live yet).

From a Google search it looks like this could be a MySQL/localhost setup issue.. is this correct? Could you provide any additional information on this?


December 22nd, 2010, 02:25 PM
We would need more details to pinpoint this issue. Please open a support ticket with us by going to support.hostek.com or emailing [email protected]

Please include URL to the page that this occurred on.

Max M.

January 3rd, 2011, 01:07 AM
I am having this exact same issue with my shared plan at CrystalTech.
Using CF9 with MySql

Thought I'd share that info because no one seems to be able to fix this persistent problem.

If the application is left idle (no user interaction) for just a few minutes, and then an http request is made that requires a call to the DB, this error is thrown.

It's completely unacceptable and not an issue on the application end.

Please let me know if a resolution comes about ...

January 3rd, 2011, 12:40 PM
With Coldfusion, this happens when pooling is enabled for the DSN and the pooling timeout is higher than the database server's connection time-out (usually this is an issues with MySQL).

This causes the database server to drop the connection before ColdFusion does. ColdFusion then attempts to use the connection, but it fails since the database server dropped it.

We've adjusted the timeouts on the remaining MySQL servers, so you shouldn't be getting that error. If that error is still occurring on your site, please submit a support ticket and we'll look into the issue and resolve it.

Max M.

January 5th, 2011, 09:32 AM
I received this error twice this week so it's still happening:

Communications link failure Last packet sent to the server was 0 ms ago

I will open a ticket.

September 20th, 2011, 06:35 PM

To clarify for anyone else receiving this error: it is related to the timeout settings for connection pooling in the site's ColdFusion DSN (data source). The Support team can fix this for you very easily if you submit a ticket (http://support.hostek.com/Customer/SubmitTicket.aspx).

If you run your own ColdFusion VPS or Dedicated server and need to fix the error, make sure the DSN timeout setting is less than the default timeout set for the database server.