Increase in "Communications link failure" errors

I’ve seen a significant uptick in the number of “lucee.runtime.exp.CustomTypeException: Communications link failure The last packet successfully received from the server was 6 milliseconds ago. The last packet sent successfully to the server was 6 milliseconds ago.” type failures in the past few months.

I’m using Lucee 5.2.x and MySQL Connector/J mysql-connector-java-8.0.14 connecting to an AWS Aurora instance.

Has anybody successfully dealt with this? How’d you solve it? It probably isn’t Lucee specific but I’m checking here to see if anyone has experienced this.


how is your instance setup, what os, are you behind a cloud instance firewall or trying to route everything over the virtual adapter?

Thanks Terry,

Ubuntu 16.04 EC2 instance connecting to an Aurora RDS cluster in a different Availability Zone. The Security Groups and Subnet configs allow 3306 traffic.

Using the same setup, minus AWS. I see these errors daily and haven’t found an actual cause.

Its more than likely the timeout for your mysql database.

in the mysql console you set up this

SET @@GLOBAL.interactive_timeout=XXXXX

XXXXX is the number of seconds you want your connection to time out. By default on most distros this is set to 8 hours. (28800)

I would tweak the database settings and then check the logs to see if the new settings are changing the timeout frequency.