[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#420010: libapache2-mod-auth-mysql: Automatic reconnect on lost MySQL connections

Package: libapache2-mod-auth-mysql
Version: 4.3.9-3
Severity: normal

Debian Etch uses MySQL 5.0.32. When upgrading from 4.1 (which was used by
Debian Sarge) several things have to be considered as mentioned at

There is stated quite at the bottom (before the user comments):
--- snip ---
The reconnect flag in the MYSQL structure is set to 0 by
mysql_real_connect(). Only those client programs which did not explicitly
set this flag to 0 or 1 after mysql_real_connect() experience a change.
Having automatic reconnection enabled by default was considered too
dangerous (due to the fact that table locks, temporary tables, user
variables, and session variables are lost after reconnection).
--- snip ---

libapache2-mod-auth-mysql doesn't set the "reconnect" flag so it is
definitely affected by the change.

We've experienced many Apache authentication errors due to lost connections
to the MySQL server. The log file (with high Apache log level) says
  [debug] mod_auth_mysql.c(1223): Query maybe-failed: MySQL server has gone away (2006), lastchance=1

Please set the reconnect flag to 1 before mysql_real_connect() which will
hopefully resolve the problem.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (700, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages libapache2-mod-auth-mysql depends on:
ii  apache2.2-common           2.2.3-4       Next generation, scalable, extenda
ii  libc6                      2.3.6.ds1-13  GNU C Library: Shared libraries
ii  libmysqlclient15off        5.0.32-7etch1 mysql database client library

libapache2-mod-auth-mysql recommends no packages.

-- no debconf information

Reply to: