Hello,
I use postfix with policyd-weight and mysql maps (froxlor interface).
Very often I got mysql errors "too many connections", but in the my.cnf
"max_connections = 500" was already set.
The Postmaster received Mails: Postfix SMTP server: errors from ....
I found in mail.log:
warning: mysql:/etc/postfix/mysql-virtual_alias_maps.cf lookup error for
"[email protected]"
warning: DD03C2982F24: virtual_alias_maps map lookup problem for
[email protected] -- message not accepted, try again later
So I checked mysql with "mysqladmin -pPASSWORD extended-status | grep
-wi 'threads_connected\|threads_running' | awk '{ print $2,$4}'" and
found some hundred open connections.
With ' mysql -pPASSWORD -e "show processlist;" ' I found most of them
was postfix processes in status sleep.
As workaround I used now proxymap and the problems are solved:
[code]
proxy_read_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf,
proxy:mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf,
proxy:mysql:/etc/postfix/mysql-virtual_alias_maps.cf,
proxy:unix:passwd.byname
virtual_mailbox_maps =
proxy:mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains =
proxy:mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_alias_maps.cf
[/code]
But I think it would be a better way, if postfix could close the mysql
connections immediately after receiving the data and not hold opened
until the mail is fully delivered.
Thank you.
Best regards,
Mathias