Timeout problems

Eric lists at anemone.cx
Wed Oct 20 18:50:42 CEST 2010


I cannot get rid of these errors!

warning: timeout on 127.0.0.1:12525 while reading input attribute name
warning: problem talking to server 127.0.0.1:12525: Connection timed out

I scoured the internet and implemented the changes recommended in
(http://www.policyd-weight.org/faq.html#resources) and they seemed to
work for the past 3 months. But now the error has shown its ugly head
again. Popping up at least once per day. I had made every change that
has ever been recommend, but no success. I am completely puzzled to what
is causing the problem.

policyd-weight version: 0.1.15 devel-3, CacheVer: 5
Perl version:           5.008008
Net::DNS version:       0.59
OS:                     Linux 2.6.18-194.3.1.el5.028stab069.6

I have searched all my logs and can find no trace of "MAX_PROC" to
indicate overage.

My server is low-usage receiving an average of 800 messages per day. It
has 4GB of ram. It's on an openVZ container, none of the resources have
exceed their limit in /proc/user_beancounters.

/proc/sys/net/core/somaxconn is 1024
originally it was 128, but changed it last time fixing this problem.

/etc/policyd-weight.conf
$PUDP            = 0;    *** I've tried with this set to 1 and still get
problems.
$TRY_BALANCE     = 1;
$CACHESIZE       = 4000;
$CACHEMAXSIZE    = 8000;
$POSCACHESIZE    = 3000;
$POSCACHEMAXSIZE = 6000;
$MAX_PROC        = 100;
$MIN_PROC        = 4; *recently changed this one to 4.

MAX_PROC matches postfix

/etc/postfix/master.cf
smtp      inet  n       -       n       -       100     smtpd

netstat -anp | grep 12525
tcp        0      0 127.0.0.1:12525
0.0.0.0:*                   LISTEN      25837/policyd-weigh
tcp        0      0 127.0.0.1:51680
127.0.0.1:12525             ESTABLISHED 25950/smtpd
tcp        0      0 127.0.0.1:12525
127.0.0.1:50935             TIME_WAIT   -
tcp        0      0 127.0.0.1:12525
127.0.0.1:51680             ESTABLISHED 26225/policyd-weigh
tcp        0      0 127.0.0.1:12525
127.0.0.1:51678             TIME_WAIT   -

Here's an excerpt from the logs:
Oct 19 21:14:37 MYSERVER postfix/smtpd[5696]: connect from
smtp14.icpbounce.com[216.27.93.112]
Oct 19 21:16:23 MYSERVER postfix/smtpd[5696]: warning: timeout on
127.0.0.1:12525 while reading input attribute name
Oct 19 21:16:23 MYSERVER postfix/smtpd[5696]: warning: problem talking to
server 127.0.0.1:12525: Connection timed out
Oct 19 21:18:04 MYSERVER postfix/smtpd[5696]: warning: timeout on
127.0.0.1:12525 while reading input attribute name
Oct 19 21:18:04 MYSERVER postfix/smtpd[5696]: warning: problem talking to
server 127.0.0.1:12525: Connection timed out
Oct 19 21:18:04 MYSERVER postfix/smtpd[5696]: NOQUEUE: reject: RCPT from
smtp14.icpbounce.com[216.27.93.112]: 451 4.3.5 Server configuration
problem; from=<bounces+454705.29871415.356246 at icpbounce.com>
to=<gabriela at MYCLIENTDOMAIN.COM> proto=ESMTP helo=<smtp14.icpbounce.com>
Oct 19 21:18:04 MYSERVER postfix/smtpd[5696]: disconnect from
smtp14.icpbounce.com[216.27.93.112]

I then ran policyd-weight manually to see if it times out, perhaps there
is a problem with the servers it is using for lookup?
echo "helo_name=smtpl4.icpbounce.com
sender=bounces+454705.29871415.356246 at icpbounce.com
client_address=216.27.93.112
request=smtpd_access_policy
" | /usr/sbin/policyd-weight -d

Result, works perfectly:
info: decided action=PREPEND X-policyd-weight:  DYN_PBL_SPAMHAUS=ERR(0)
NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5
HELO_IP_IN_CL_SUBNET=-1.2 (check from: .icpbounce. - helo:
.smtpl4.icpbounce. - helo-domain: .icpbounce.)
FROM/MX_MATCHES_HELO(DOMAIN)=-2 <helo_ips:  smtpl4.icpbounce.com
216.27.93.102 216.27.93.7 216.27.93.8 216.27.93.10 69.166.132.247
216.27.93.10 216.27.93.102 216.27.93.7 216.27.93.8 69.166.132.247>; rate:
-7.7;

I also have the nscd service running as local DNS cache. In my logs most
of the policyd-weight policy check indicate a delay of 0s or 2s. The
largest was around 20+ seconds.









More information about the Policyd-weight-users mailing list