HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   Postfix + MySQL (

bl4ckb1rd 17th March 2009 16:21

Postfix + MySQL
Hello !

Is there any way i can set wait_timeout = 30 in my.cnf and avoiding getting MySQL gone away statement by Postfix ? Problem is, mysql connections are sleeping for very long time, if many ip's are connecting to mail server, which makes new connections frozen. This actually means mysql server stops working as it's waiting for sleeping processes to die, and whole server doesn't work as it should. Webpages, dns, postfix etc... The problem is if i set wait_timeout = 30, everything is fine, but postfix's connection gets dropped saying "Mysql server has gone away". how to tell postfix to try reconnecting to mysql instead of thinking it's already connected ? That would solve the issue, and block the "attackers" that are sending email to one of the domains hosted on webserver. Any tip would be greatly apriciated.

till 17th March 2009 22:29

Instead of setting timouts for mysql you should set connection timeouts and limits in postfix.

till 17th March 2009 22:32

Also you should set these teo values in the mysqld section of my.cnf:

max_connections = 500
max_user_connections = 500

bl4ckb1rd 18th March 2009 10:47

Thanks for tip Till, although I'm not very familiar with postfix. I used qmail so far. I'll see the manual if I can get some info about how to set such timeouts in postfix that you are talking about. Thanks for info though, I appreciate it.

All times are GMT +2. The time now is 15:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.