
26th August 2011, 09:17
|
|
Junior Member
|
|
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
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.
|

26th August 2011, 09:58
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,196 Times in 3,212 Posts
|
|
Edit the mysql my.cnf file and set max_connections and max_user_connections to 500 and restart mysql.
|

26th August 2011, 10:10
|
|
Junior Member
|
|
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
I'll give it a try. I had upp'ed max_connections to 200 already but didnt know about max_user_connections. Many thanks!
|

26th August 2011, 11:52
|
|
Junior Member
|
|
Join Date: Jan 2008
Location: Freiburg, Germany
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
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.
|

27th August 2011, 12:16
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
Which distribution do you use? Does your Postfix have MySQL support compiled in?
What's the output of , and what's in /etc/postfix/mysql-virtual_relaydomains.cf?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 23:52.
|
Recent comments
23 hours 59 min ago
1 day 5 min ago
1 day 5 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 18 hours ago
2 days 45 min ago
2 days 4 hours ago
2 days 6 hours ago