Jun 21, 2022
Excellent article !!
Few points to add:
1. CONN_MAX_AGE should be less than DB's IDLE/TIMEOUT. Ex: wait_timeout in Mysql.
2. Keep in mind that the development server creates a new thread for each request it handles, so testing persistent connections in development server would be dificult.
3. Alternatively, Connection pooling can also help instead of persistent connections.