#1  
Old 26th August 2011, 09:17
ande ande is offline
Junior Member
 
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Question Lots of errors / MySQL overload

Hi there,

I get a lot of messages like

Quote:
PHP Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
PHP Warning: mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
PHP Warning: mysql_connect(): Too many connections in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
PHP Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
PHP Warning: mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
OK, those may be "only" warnings, but I wanted to report them regardless.

What bothers me more is a lot of unavailability of MySQL from ClamAV:

Quote:
Aug 26 00:41:45 eins postfix/error[25316]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 00:41:45 eins postfix/error[25320]: warning: connect to mysql server 127.0.0.1: Too many connections
Aug 26 00:41:45 eins postfix/error[25320]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 00:41:45 eins postfix/master[29367]: warning: process /usr/lib/postfix/error pid 25286 exit status 1
Aug 26 00:41:45 eins postfix/master[29367]: warning: /usr/lib/postfix/error: bad command startup -- throttling
Aug 26 00:41:45 eins postfix/qmgr[24239]: warning: private/retry socket: malformed response
Aug 26 00:41:45 eins postfix/qmgr[24239]: warning: transport retry failure -- see a previous warning/fatal/panic logfile record for the problem description
Aug 26 00:41:45 eins postfix/qmgr[24239]: warning: connect to mysql server 127.0.0.1: Too many connections
Aug 26 00:41:45 eins postfix/qmgr[24239]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 00:41:45 eins postfix/master[29367]: warning: process /usr/lib/postfix/error pid 25292 exit status 1
Aug 26 00:41:45 eins postfix/master[29367]: warning: process /usr/lib/postfix/error pid 25297 exit status 1
And this:
Quote:
Aug 26 00:41:46 eins postfix/master[29367]: warning: process /usr/lib/postfix/error pid 25315 exit status 1
Aug 26 00:41:46 eins postfix/master[29367]: warning: process /usr/lib/postfix/error pid 25316 exit status 1
Aug 26 00:41:46 eins postfix/master[29367]: warning: process /usr/lib/postfix/error pid 25320 exit status 1
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/smtpd[23935]: warning: mysql:/etc/postfix/mysql-virtual_recipient.cf: table lookup problem
Aug 26 00:41:46 eins postfix/master[29367]: warning: process /usr/lib/postfix/qmgr pid 24239 exit status 1
Aug 26 00:41:47 eins amavis[25305]: (25305-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;por t=3306': Too many connections
Aug 26 00:41:47 eins amavis[25305]: (25305-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 103) line 241, line 5.
Aug 26 00:41:47 eins amavis[25305]: (25305-01) (!)Requesting process rundown after fatal error
Aug 26 00:41:47 eins postfix/smtp[25296]: warning: connect to mysql server 127.0.0.1: Too many connections
Aug 26 00:41:47 eins postfix/smtp[25296]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 00:41:47 eins amavis[25334]: (25334-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=dbispconfig;host=127.0.0.1;por t=3306': Too many connections
Aug 26 00:41:47 eins amavis[25334]: (25334-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 103) line 241, line 5.
Aug 26 00:41:47 eins amavis[25334]: (25334-01) (!)Requesting process rundown after fatal error
Aug 26 00:41:47 eins postfix/smtpd[23441]: warning: 63.168.93.7: hostname corporat063-168093007.sta.intercable.net.co verification failed: Name or service not known
Aug 26 00:41:47 eins postfix/cleanup[23798]: warning: BDAD310253F: virtual_alias_maps map lookup problem for webmaster@xxxx.de
Aug 26 00:41:47 eins amavis[24882]: (24882-20-3) (!)SEND via SMTP: -> ,ENVID=AM..20110825T224147Z@eins.xxxxx.net 451 4.3.0 TempFailed, id=24882-20-3, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error
How can I tweak the resources so this won't happen? I have 8 GB RAM, 4 core processor and so far not many domains on it.
Reply With Quote
Sponsored Links
  #2  
Old 26th August 2011, 09:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,509
Thanks: 815
Thanked 5,269 Times in 4,130 Posts
Default

Edit the mysql my.cnf file and set max_connections and max_user_connections to 500 and restart mysql.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 26th August 2011, 10:10
ande ande is offline
Junior Member
 
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I'll give it a try. I had upp'ed max_connections to 200 already but didnt know about max_user_connections. Many thanks!
Reply With Quote
  #4  
Old 26th August 2011, 11:52
ande ande is offline
Junior Member
 
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I'm sorry I have to return but still got many log entries like:

Quote:
Aug 26 11:38:45 eins postfix/trivial-rewrite[2715]: warning: transport_maps lookup failure
Aug 26 11:38:45 eins postfix/trivial-rewrite[2715]: warning: transport_maps lookup failure
Plus, at the moment my mail queue is rather full, mail log says reasons mostly like:

Quote:
unknown mail transport error
To be honest, I am currently testing the performance of the mail server: I have a honeypot that generates random nonexistant mail addresses for one domain (I can turn MX for that domain off for I usually dont use mail on that domain) and displays it on a webpage. For sure the crawler bots harvest that and then try to send all sorts of SPAM and virusses. I get a lot of attempts to send mail, most of them get blocked by postfix already. The server load is still below 0.2 ...

Amavis still cries in its pillow:

Quote:
Aug 26 11:36:42 eins amavis[2649]: (02649-01) (!!)TROUBLE in check_mail: quar+notif FAILED: temporarily unable to notify admin: 451 4.3.0 TempFailed, id=02649-01, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error at /usr/sbin/amavisd-new line 12953.
Aug 26 11:36:42 eins postfix/smtp[2692]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 11:36:43 eins postfix/error[2689]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 11:36:44 eins postfix/qmgr[2693]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 11:36:52 eins postfix/trivial-rewrite[2659]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Aug 26 11:37:07 eins postfix/trivial-rewrite[2707]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
Aug 26 11:38:20 eins amavis[2649]: (02649-08) (!!)TROUBLE in check_mail: quar+notif FAILED: temporarily unable to notify admin: 451 4.3.0 TempFailed, id=02649-08, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error at /usr/sbin/amavisd-new line 12953.
Aug 26 11:38:20 eins postfix/smtp[2726]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem

Last edited by ande; 26th August 2011 at 11:54.
Reply With Quote
  #5  
Old 27th August 2011, 12:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,736 Times in 2,571 Posts
 
Default

Which distribution do you use? Does your Postfix have MySQL support compiled in?

What's the output of
Code:
netstat -tap
, and what's in /etc/postfix/mysql-virtual_relaydomains.cf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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
Squirrelmail login failure Cracklefish Installation/Configuration 9 30th June 2010 20:38
Upgradeded to mysql4.1 breaks mysql client PoleCat Installation/Configuration 5 22nd April 2008 17:38
mysql clustering problem : cannot create table in database prince.fer Server Operation 2 16th April 2007 17:03
MySQL connection errors drake General 9 23rd August 2006 17:57
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 11:44.


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