ColdFusion 10 Error communicating with MySQL

We are migrating some websites to the cloud infrastructure with Windows 2008 virtual machines. These websites run on ColdFusion with MySQL databases. They currently work in our CoLo with no problems. In addition, they work without problems in our development network in our offices.

We are setting up our cloud to match the configuration we use as accurately as possible, which is essentially CF10 + IIS on one server and MySQL on a separate machine. We finished 99% and most things work just fine. However....

We came across a couple, as in 2, the places where we click the link / button, and welcome:

Error executing database query.

Communication error. The last packet successfully received from the server was 0 milliseconds ago. The last packet successfully sent to the server was 0 milliseconds ago.

Scan stack trace I also find: Caused by: java.net.SocketException: Connection reset

Communication error. ALWAYS: 0ms.

What most puzzles the queries that seem to trigger are simple queries that are used for FREE on sites with no problems. Why do they fail, because in two specific places we are waiting for the end.

Our only clue is that looking at the description of the CF error from which the script is called, we can see that the script, where the request fails, calls the call twice? For example, one of the entries in our application file:

 >The error occurred in D:/Our_Web_Sites/oursite/Application.cfm: line 73 >Called from D:/Our_Web_Sites/oursite/Application.cfm: line 17 >Called from D:/Our_Web_Sites/oursite/Application.cfm: line 1 >Called from D:/Our_Web_Sites/oursite/Application.cfm: line 73 >Called from D:/Our_Web_Sites/oursite/Application.cfm: line 17 >Called from D:/Our_Web_Sites/oursite/Application.cfm: line 1 

We cannot find anything in our CF code that calls the script call twice, so our hunch is the first call in the request, so the CF tries again ... only for failure and error.

In this article, I found a lot of messages about changing MySQL timeouts. None of those who worked, and I did not expect them, since what we are dealing with does not seem to be a timeout problem. These pages fail every time.

Closest we came to the solution that appeared on this blog: http://www.talkingtree.com/blog/index.cfm/2011/1/12/Validation-Query-for-MySQL-communications-link-failure !

If we NEED the setting "Maintain connections on client requests". In CFAdmin, the error will disappear. The blog suggests leaving this checkbox, which is our advantage, and using the "SELECT 1;" connection check. Try this same error.

We also tried the JDBC parameter AutoConnect = true. No effect.

We downloaded the latest JDBC connector and used it instead of the standard CF10-MySQL connector. No effect.

Again, 99% of the site works, with the exception of these two links, both of which work great in all of our other environments. Any other ideas?

+6
source share
2 answers

I feel like I had a similar problem every time I updated CF or MySQL. Usually a change in the JDBC driver or connection string helps, and I see that you have already tried.

Have you checked the MySQL error log for any hints? Ours is located in / var / lib / mysql (regardless of your datadir variable) and ends with the .err extension.

Also, maybe you are trying to use some other JDBC connection string parameters for your version? I see some advanced protocols that you can enable. http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html

0
source

Problem detected. We use our network in the Savvis cloud infrastructure. The instances of the Windows server that we used from Savvis had the Trend Micro Deep Security Agent installed. This is an intrusion protection system, and it was a problem. Disabling the service cleared all communication errors. I do not know why he rejected some requests that he had just accepted earlier. I'm just glad (finally) to put this behind me!

0
source

Source: https://habr.com/ru/post/927393/


All Articles