Ray: > Hello, > > System is FreeBSD 7.0, postfix 2.6.2, mysql storage of user info, amvisd-new, > and dovecot for authentication and pop/imap. postconf -n at end of post. > > Just Yesterday I started receiving a lot of > "warning: connect to mysql server localhost: Too many connections" > (Sample log files follow signature) > Mysql is showing about 75 sleeping connections from the mail database user.
Short reply: s/mysql/proxy:mysql/ Long reply: see "man a proxymap". Wietse > in my.cnf I increased "max_connections" to 300 and dropped "wait_timeout" to > 4000 seconds and this seems to have fixed it for now, but I'm trying to > figure > out what's going on. > > the real weird part is that yesterday I had over 2500 occurrences of "too > many > connections" in the log file, but the previous week combined gave me 160 > total. Is there a setting I can tweak, or should I be taking this to dovecot > or amvisd? > > Google wasn't very helpful > and the closest thing that I could find in the archives was "Postfix not > closing > mysql connections" back on 08/12/07, and it did help, but it didn't fully > answer my question. > Any help, including links to the docs appreciated. > Ray > > > Sample log lines: > May 7 13:46:35 wserver postfix/cleanup[27554]: warning: connect to mysql > server localhost: Too many connections > May 7 13:46:36 wserver amavis[28466]: (28466-01) (!)connect_to_sql: unable > to > connect to DSN 'DBI:mysql:database=internal;host=localhost;port=3306': Too > many connections > Apr 29 09:35:28 wserver postfix/virtual[79240]: warning: connect to mysql > server localhost: Too many connections > Apr 29 09:35:29 wserver postfix/smtpd[78246]: warning: connect to mysql > server > localhost: Too many connections > Apr 29 09:35:29 wserver postfix/cleanup[78685]: warning: connect to mysql > server localhost: Too many connections > > > postconf -n > alias_database = hash:/etc/mail/aliases > alias_maps = hash:/etc/mail/aliases > bounce_template_file = /usr/local/etc/postfix/bounce.cf > broken_sasl_auth_clients = yes > command_directory = /usr/local/sbin > config_directory = /usr/local/etc/postfix > content_filter = amavisfeed:[127.0.0.1]:10024 > daemon_directory = /usr/local/libexec/postfix > debug_peer_level = 2 > delay_warning_time = 4h > disable_vrfy_command = yes > html_directory = no > inet_interfaces = all > mail_owner = postfix > mailbox_size_limit = 0 > mailq_path = /usr/local/bin/mailq > manpage_directory = /usr/local/man > message_size_limit = 250000000 > myhostname = mail.geekdelivery.com > mynetworks_style = host > newaliases_path = /usr/local/bin/newaliases > queue_directory = /var/spool/postfix > readme_directory = no > sample_directory = /usr/local/etc/postfix > sendmail_path = /usr/local/sbin/sendmail > setgid_group = maildrop > show_user_unknown_table_name = no > smtpd_banner = $myhostname ESMTP $mail_name > smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, > reject_unauth_destination > smtpd_sasl_auth_enable = yes > smtpd_sasl_path = /var/spool/postfix/private/auth > smtpd_sasl_type = dovecot > smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, > reject_non_fqdn_sender, reject_sender_login_mismatch > soft_bounce = yes > transport_maps = hash:/usr/local/etc/postfix/transport > unknown_local_recipient_reject_code = 550 > virtual_alias_maps = mysql:/usr/local/etc/postfix/sql/virtual_alias_maps.cf > mysql:/usr/local/etc/postfix/sql/virtual_email2email.cf > mysql:/usr/local/etc/postfix/sql/catchall_alias_maps.cf > virtual_gid_maps = mysql:/usr/local/etc/postfix/sql/virtual_gid_maps.cf > virtual_mailbox_base = /usr/local/mail > virtual_mailbox_domains = > mysql:/usr/local/etc/postfix/sql/virtual_mailbox_domains.cf > virtual_mailbox_limit = 1000000000 > virtual_mailbox_maps = > mysql:/usr/local/etc/postfix/sql/virtual_mailbox_recipients.cf > virtual_transport = virtual > virtual_uid_maps = mysql:/usr/local/etc/postfix/sql/virtual_uid_maps.cf > > > > > >