HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   MySQL server has gone away (http://www.howtoforge.com/forums/showthread.php?t=51090)

savago 24th January 2011 09:39

MySQL server has gone away
 
Some errors:

Debian lenny 2.6.26-2-686 with ISPconfig 3 CP
ps aux| grep amavis
root 16470 0.0 0.0 3120 716 pts/0 S+ 10:39 0:00 grep amavis
amavis 23212 0.0 2.2 56520 46844 ? Ss Jan20 0:06 amavisd (master)
amavis 23938 0.0 2.3 59180 49428 ? S Jan20 0:03 amavisd (ch8-avail)
amavis 23939 0.0 2.3 58060 48264 ? S Jan20 0:03 amavisd (ch8-avail)
server1:/var/log# ps aux| grep mysqld
root 16472 0.0 0.0 3120 716 pts/0 S+ 10:39 0:00 grep mysqld
root 22955 0.0 0.0 3892 1284 ? S Jan20 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 22992 0.0 0.9 131304 20548 ? Sl Jan20 3:09 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root 22993 0.0 0.0 3008 604 ? S Jan20 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld




amavis[23939]: (23939-07) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 86) line 166, <GEN114> line 5.

...

amavis[2399]: (02399-02) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 86) line 166, <GEN48> line 3.

till 24th January 2011 17:19

Please try this:

http://www.howtoforge.com/forums/sho...25&postcount=2

savago 25th January 2011 08:30

Quote:

Originally Posted by till (Post 249489)

Not working by me.
amavis[2633]: (02633-04) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 86) line 166, <GEN68> line 5.

This is only testing server with only 1 domain 1/ftp/mail user acount.There is not any website with running mysql db.

Intel(R) Atom(TM) CPU 330 @ 1.60GH / 2 GB RAM

falko 26th January 2011 14:10

What's the output of
Code:

netstat -tap
?

savago 26th January 2011 15:43

Quote:

Originally Posted by falko (Post 249635)
What's the output of
Code:

netstat -tap
?

Code:

netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name
tcp        0      0 *:imaps                *:*                    LISTEN      2860/dovecot   
tcp        0      0 *:pop3s                *:*                    LISTEN      2860/dovecot   
tcp        0      0 localhost:10024        *:*                    LISTEN      2191/amavisd (maste
tcp        0      0 localhost:10025        *:*                    LISTEN      2821/master   
tcp        0      0 *:mysql                *:*                    LISTEN      23483/mysqld   
tcp        0      0 *:submission            *:*                    LISTEN      2821/master   
tcp        0      0 *:46380                *:*                    LISTEN      1913/rpc.statd 
tcp        0      0 *:pop3                  *:*                    LISTEN      2860/dovecot   
tcp        0      0 localhost:spamd        *:*                    LISTEN      4426/spamd.pid 
tcp        0      0 *:imap2                *:*                    LISTEN      2860/dovecot   
tcp        0      0 *:sunrpc                *:*                    LISTEN      1897/portmap   
tcp        0      0 *:ssmtp                *:*                    LISTEN      2821/master   
tcp        0      0 *:ftp                  *:*                    LISTEN      2835/pure-ftpd (SER   
tcp        0      0 localhost:domain        *:*                    LISTEN      2149/named     
tcp        0      0 *:ssh                  *:*                    LISTEN      2164/sshd     
tcp        0      0 *:smtp                  *:*                    LISTEN      2821/master   
tcp        0      0 localhost:953          *:*                    LISTEN      2149/named     
tcp6      0      0 [::]:http-alt          [::]:*                  LISTEN      2924/apache2   
tcp6      0      0 [::]:www                [::]:*                  LISTEN      2924/apache2   
tcp6      0      0 [::]:tproxy            [::]:*                  LISTEN      2924/apache2   
tcp6      0      0 [::]:ftp                [::]:*                  LISTEN      2835/pure-ftpd (SER
tcp6      0      0 [::]:domain            [::]:*                  LISTEN      2149/named     
tcp6      0      0 [::]:ssh                [::]:*                  LISTEN      2164/sshd     
tcp6      0      0 localhost:953          [::]:*                  LISTEN      2149/named     
tcp6      0      0 [::]:https              [::]:*                  LISTEN      2924/apache2


falko 27th January 2011 14:08

Hm, MySQL is up and running. Can you post your amavisd configuration from /etc/amavis/conf.d/50-user?

savago 28th January 2011 17:33

Quote:

Originally Posted by falko (Post 249724)
Hm, MySQL is up and running. Can you post your amavisd configuration from /etc/amavis/conf.d/50-user?

cat 50-user
use strict;

#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#

@bypass_virus_checks_maps = (
\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);

@bypass_spam_checks_maps = (
\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);

#
# Database connection settings
#

@lookup_sql_dsn =
( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;por t=3306', 'ispconfig', 'bafc7429bfff9adff285674e8a5abfe0'] );

# @storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database
#$sql_select_policy = 'SELECT "Y" as local FROM mail_domain WHERE CONCAT("@",domain) IN (%k)';
# $banned_files_quarantine_method = 'sql';
# $spam_quarantine_method = 'sql';

#
# SQL Select statements
#

$sql_select_policy =
'SELECT *,spamfilter_users.id'.
' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';


$sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' .
' ORDER BY spamfilter_wblist.priority DESC';

#
# Quarantine settings
#

$final_virus_destiny = D_BOUNCE;
$final_spam_destiny = D_DISCARD;
$final_banned_destiny = D_BOUNCE;
$final_bad_header_destiny = D_PASS;

# Default settings, we st this very high to not filter aut emails accidently
$sa_spam_subject_tag = '***SPAM*** ';
$sa_tag_level_deflt = 20.0; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 60.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 60.0; # triggers spam evasive actions
$sa_dsn_cutoff_level = 100; # spam level beyond which a DSN is not sent

#
# Disable spam and virus notifications for the admin user.
# Can be overridden by the policies in mysql
#

$virus_admin = undef;
$spam_admin = undef;


#
# Enable Logging
#

$DO_SYSLOG = 1;
$LOGFILE = "/var/log/amavis.log"; # (defaults to empty, no log)

# Set the log_level to 5 for debugging
$log_level = 0; # (defaults to 0)


#------------ Do not modify anything below this line -------------
1; # insure a defined return
server1:/etc/amavis/conf.d#

falko 29th January 2011 16:21

Quote:

@lookup_sql_dsn =
( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;por t=3306', 'ispconfig', 'bafc7429bfff9adff285674e8a5abfe0'] );
You have "por t=3306", but it must be "port=3306" (without the space).

savago 29th January 2011 16:57

Quote:

Originally Posted by falko (Post 249891)
You have "por t=3306", but it must be "port=3306" (without the space).


Sorry,this is error when paste:
Code:

@lookup_sql_dsn =
  ( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306', 'ispconfig', 'bafc7429bfff9adff285674e8a5abfe0'] );


falko 30th January 2011 16:14

Are the MySQL details in that line ok (DB name, username, password)?


All times are GMT +2. The time now is 12:41.

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