Answer the question
In order to leave comments, you need to log in
Listen queue overflow in FreeBSD when mailing. Where to twist?
It goes like this.
Dedicated server. PHP script makes a small mailing list, 1000-2000 emails. At the same time, for some reason, the system queue for pickup (an auxiliary service for Postfix) gets clogged:
netstat -Lan
...
unix 151/0/100 public/pickup
...
kernel: sonewconn: pcb 0xfffff8004cbbf870: Listen queue overflow: 151 already in queue awaiting acceptance
last message repeated 972 times
Feb 15 17:01:02 theserver postfix/pickup[29787]: 7627929DE4A5: uid=1001 from=<theuser>
Feb 15 17:01:02 theserver postfix/cleanup[33164]: 7627929DE4A5: message-id=<[email protected]>
Feb 15 18:01:02 theserver opendkim[972]: 7627929DE4A5: DKIM-Signature field added (s=thedomen, d=thedomen.ru)
Feb 15 17:01:02 theserver postfix/qmgr[81797]: 7627929DE4A5: from=<[email protected]>, size=1811, nrcpt=1 (queue active)
Feb 15 17:01:03 theserver postfix/smtp[33168]: 7627929DE4A5: to=<[email protected]>, relay=mx.yandex.ru[87.250.250.89]:25, conn_use=11, delay=58, delays=57/0/0/0.61, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued on mxfront3j.mail.yandex.net as 1487167263-xPE7azV17j-12jSJTiT)
Feb 15 17:01:03 theserver postfix/qmgr[81797]: 7627929DE4A5: removed
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_recipient_access hash:/usr/local/etc/postfix/access
# Запрещение приёма почты с некоторых адресов
smtpd_sender_restrictions = hash:/usr/local/etc/postfix/incoming_access
smtpd_banner = $myhostname ESMTP
local_recipient_maps = hash:/usr/local/etc/postfix/recipient_map $alias_maps
# DKIM
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
Answer the question
In order to leave comments, you need to log in
This is not a queue of mail, but of incoming TCP connections. Stupid your pickup, does not have time to process new connections. Put a pause in the script that sends letters, let it not send all 1000 at once, but 100 at a time. Or look, because of what pickup can be stupid. Maybe the disk load is high. Maybe there is not enough memory and it swaps constantly.
Set kern.ipc.soacceptqueue to a value greater than the current value in sysctl.conf.
Old setting
deprecated
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question