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?