Bug 67720 - DBD connection pool does not re-open new connections on connection failure
Summary: DBD connection pool does not re-open new connections on connection failure
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_dbd (show other bugs)
Version: 2.4.52
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-12 21:06 UTC by Jawaid Bazyar
Modified: 2023-10-12 21:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jawaid Bazyar 2023-10-12 21:06:51 UTC
Hi,

My stack is:

ubuntu 22.04
mysql 8.0.34
apache 2.4.52

using mod_dbd
and mod_authn_dbd

Using Apache prefork model as this application is also using PHP.

Apache DBD pool manager does not attempt to re-create new database connections when one of the two following events has occurred:

1. mysqld 8 wait_timeout of 28800 (8 hours) is exceeded and mysqld terminates the database connection.

Authentication attempt results in Apache error:

[Thu Oct 12 20:32:28.772898 2023] [dbd:error] [pid 3303607] (20014)Internal error (specific information not available): AH00639: DBD [mysql] Error: The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.

2. mysqld 8 server is stopped and restarted.

Authentication attempt results in apache error:

[Thu Oct 12 20:52:08.384771 2023] [dbd:error] [pid 3307623] (20014)Internal error (specific information not available): AH00639: DBD [mysql] Error: Lost connection to MySQL server during query

in neither case does Apache DBD attempt to create a new database query.

The only remediation is to reload or restart apache.

Apache DBD, since it is aware the connections were terminated, should automatically attempt to reestablish the database connection(s).