ColdFusion · Database exception

Per-Application Datasource Not Found After Restart

What does Per-Application Datasource Not Found After Restart mean in ColdFusion?

A datasource defined in this.datasources inside Application.cfc intermittently isn't available the first time onApplicationStart() runs after a service restart — roughly one restart in ten — even though the configuration is correct. An internal ColdFusion caching issue fails to register the datasource before application bootstrap tries to query it.

Per-Application Datasource Not Found After RestartAdobe ColdFusion

Condition

A datasource defined in this.datasources inside Application.cfc intermittently isn't available the first time onApplicationStart() runs after a service restart — roughly one restart in ten — even though the configuration is correct. An internal ColdFusion caching issue fails to register the datasource before application bootstrap tries to query it.

Fix

Force ColdFusion to refresh its internal datasource cache by mutating any property of the datasource struct at startup (stamping a timestamp value into it, for example), which reliably triggers re-registration on the retry onApplicationStart() gets on the next request.

Pending source verification. Not yet checked against official documentation.

Related database exception