ColdFusion · Database exception

MySQL Communications Link Failure

What does MySQL Communications Link Failure mean in ColdFusion?

Surfaces intermittently when cfquery reuses a pooled MySQL connection that's gone stale — the connection sat idle past MySQL's wait_timeout, or the MySQL Connector/J bundled with a given ColdFusion release handles idle pooled connections differently than the driver in a prior version. The message reports the last packet was sent "0 ms ago" because CF hands back a connection the database already dropped.

MySQL Communications Link FailureAdobe ColdFusion

Condition

Surfaces intermittently when cfquery reuses a pooled MySQL connection that's gone stale — the connection sat idle past MySQL's wait_timeout, or the MySQL Connector/J bundled with a given ColdFusion release handles idle pooled connections differently than the driver in a prior version. The message reports the last packet was sent "0 ms ago" because CF hands back a connection the database already dropped.

Fix

Keep 'Maintain Connections' enabled but add a lightweight validation query (SELECT 1) to the datasource so ColdFusion tests and discards dead pooled connections before reuse, and raise MySQL's wait_timeout if idle periods are long.

Pending source verification. Not yet checked against official documentation.

Related database exception