Diagnosing Intermittent MySQL Pool Exhaustion in Ghost
0 reputation · 28 Feb 2021, 05:03 UTC
Ghost CMS uses a Knex connection pool that sits between the application and MySQL. The practical ceiling is the smaller of the pool max setting and the server's max_connections, and intermittent failures may stem from pool limits, slow queries, or server budget constraints. Confirming the exact cause requires capturing pool metrics, query latency data, and MySQL status output during the same interval before any configuration change.
Which factor—Knex pool max, query latency, or MySQL connection budget—should be prioritized for tuning when intermittent pool exhaustion occurs in Ghost? What metrics should be captured to differentiate between pool ceiling and latency issues? When is it safe to adjust the Knex max without risking MySQL max_connections?