Menu

#24 Sqlgrey becomes unresponsive if MySQL server is unavailable

open
nobody
database (9)
5
2010-07-05
2010-07-05
rcb
No

Version: 1.8.0rc2-1

Sqlgrey behaves normally when the mysql server is killed with e.g. /etc/init.d/mysql stop, postfix then continues to deliver e-mail normally
When the server becomes unavailable for other reasons, for example using 'iptables -A INPUT -p tcp --dport 3306 -j DROP', then two different things happen.
- Sqlgrey dies, resulting in 'warning: connect to 127.0.0.1:2501: Connection refused', which gives postfix configuration errors and 4.3.5 error messages to the clients.
- Sqlgrey keeps waiting for the connection to timeout, this results in messages like 'dbaccess: can't connect to DB: Can't connect to MySQL server on '127.0.0.1' (110)'. The effect is the same, 4.3.5 error messages to the clients.

This can be reproduced by firewalling MySQL using 'iptables -A INPUT -p tcp --dport 3306 -j DROP'

Discussion