#1  
Old 17th March 2009, 15:21
bl4ckb1rd bl4ckb1rd is offline
Member
 
Join Date: Feb 2009
Posts: 36
Thanks: 2
Thanked 6 Times in 4 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 17th March 2009, 21:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,034
Thanks: 826
Thanked 5,382 Times in 4,229 Posts
Default

Instead of setting timouts for mysql you should set connection timeouts and limits in postfix.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 17th March 2009, 21:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,034
Thanks: 826
Thanked 5,382 Times in 4,229 Posts
Default

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

max_connections = 500
max_user_connections = 500
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 18th March 2009, 09:47
bl4ckb1rd bl4ckb1rd is offline
Member
 
Join Date: Feb 2009
Posts: 36
Thanks: 2
Thanked 6 Times in 4 Posts
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 01:58.


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