List Info

Thread: Amavisd Lost Connection...




Amavisd Lost Connection...
user name
2006-03-25 17:43:52
Greetings,

I am seeing the following in our mail logs:

...
lost connection with localhost[127.0.0.1] while sending end
of data -- message may be sent more than once
...

Looks like Amavisd is closing the connection on Postfix, but
I don't know why.  I have verified our settings in all of
AMAVISD.CONF, MAIN.CF & MASTER.CF - everything looks
good...

We've got 2 boxes (identical configuration) running with
Postfix(2.2.8)/Amavisd(2.3.3)/SpamAssassin(3.1.0)...one is
less powerful than the other and it experiences this issue
much more...it also has many (2000+) temp directories under
/var/amavis/tmp that have been 'left behind' over the last
4 or 5 weeks...

The more powerful box isn't exhibiting these signs however
(only a couple of directories in /var/amavis/tmp) as well as
a couple of the error messages listed above...

Logic dictates that there may be a resource issue on the
less powerful box, but reviewing the mail & OS
logs/stats show that it is passing traffic in a reasonable
fashion (i.e. nothing is really queuing up and proc/mem
stats look good)...

1) Has anyone seen this before?
2) What should I start looking at to determine the root
cause?
3) What config settings should I modify to see what the
impact/change is?

Any help is always greatly appreciated...

Thanx!!

Dustin. 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http:
//sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$
1720&dat1642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
Amavisd Lost Connection...
user name
2006-03-25 19:05:24
Dustin wrote:

> Greetings,

> ...
> lost connection with localhost[127.0.0.1] while sending
end of data
> ...

> but reviewing the mail & OS logs/stats show that it
is passing traffic
>  in a reasonable fashion (i.e. nothing is really
> queuing up and proc/mem stats look good)...

> Dustin. 

Generally you will want to raise $log_level so you
can get more details. Observe the TIMING data for one thing.
How much time does SA usually spend on processing?

Gary V



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
Amavisd Lost Connection...
user name
2006-03-26 11:55:52
Dustin Humm wrote:
> Greetings,
> 
> I am seeing the following in our mail logs:
> 
> ...
> lost connection with localhost[127.0.0.1] while sending
end of data -- message may be sent more than once
> ...
> 
> Looks like Amavisd is closing the connection on
Postfix, but I don't know why.  I have verified our
settings in all of AMAVISD.CONF, MAIN.CF & MASTER.CF -
everything looks good...
> 
> We've got 2 boxes (identical configuration) running
with Postfix(2.2.8)/Amavisd(2.3.3)/SpamAssassin(3.1.0)...one
is less powerful than the other and it experiences this
issue much more...it also has many (2000+) temp directories
under /var/amavis/tmp that have been 'left behind' over
the last 4 or 5 weeks...
> 
> The more powerful box isn't exhibiting these signs
however (only a couple of directories in /var/amavis/tmp) as
well as a couple of the error messages listed above...
> 
> Logic dictates that there may be a resource issue on
the less powerful box, but reviewing the mail & OS
logs/stats show that it is passing traffic in a reasonable
fashion (i.e. nothing is really queuing up and proc/mem
stats look good)...
> 
> 1) Has anyone seen this before?
> 2) What should I start looking at to determine the root
cause?
> 3) What config settings should I modify to see what the
impact/change is?
> 
> Any help is always greatly appreciated...
> 
> Thanx!!
> 
> Dustin. 

Try looking for amavis crash errors in the kernel log. Temp
directories 
normally get removed by amavis, except when it crashes. That
could be 
due to resource problems. If that is the case raising the
log level for 
amavis does not help much.

Gorn



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
Amavisd Lost Connection...
user name
2006-03-26 14:59:45
Gorn wrote:

> Try looking for amavis crash errors in the kernel log.
Temp directories
> normally get removed by amavis, except when it crashes.
That could be 
> due to resource problems. If that is the case raising
the log level for 
> amavis does not help much.

> Gorn

This seems to fit. I would be inclined to compare the
version numbers of all the external modules amavisd-new uses
with the
other system. For example, there were a couple of instances
in the
archives where Digest::MD5 was a problem on a couple Solaris
machines.
The logs indicated amavisd-new just stopped working, no
error messages.
Stay away from Net::Server 0.91 and 0.92. Also make sure
$max_servers
and maxproc match:

"It is imperative that both the Postfix and the
amavisd-new use the same value.
Actually the amavisd setting may be higher that the Postfix,
but this serves
no useful purpose and just wastes resources. The
amavisd.conf parameter is
the $max_servers, the Postfix parameter is the maxproc field
in the
'smtp-amavis' entry (file master.cf)."

Gary V



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
Amavisd Lost Connection...
user name
2006-03-26 15:11:40
I would also be inclined to  temporarily set:

$max_requests = 5;

simply to see if this has any effect (better, worse, not
any).

Gary V



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
Amavisd Lost Connection...
user name
2006-03-26 15:18:55
Gary wrote:

> I would also be inclined to  temporarily set:
> $max_requests = 5;
> simply to see if this has any effect (better, worse,
not any).

and I would get amavisd-nanny up and running and observe it
for a
while. See if you get "went away". Search the
archives for
amavisd-nanny.

Gary V



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
Amavisd Lost Connection...
user name
2006-03-26 20:38:05
Michael,
> I thought I once read that you want the amavisd value
(max_servers)
> higher than postfix since the release form quarantine
function would use
> an amavisd server.

If you only use amavisd-release once in a blue moon and it
can wait a
little when all child processes are busy checking mail, it
is fine to have 
Postfix max_proc setting the same as $max_servers.

If amavisd-release is used regularly, perhaps by some GUI in
end-user's hands,
then it may be useful to have one additional amavisd child
process in order
to promptly respond to amavisd-release requests.

Dustin,
> lost connection with localhost[127.0.0.1] while sending
end of data -- 
message may be sent more than once
> ... it also has many (2000+) temp directories under
/var/amavis/tmp that
> have been 'left behind' over the last 4 or 5 weeks...

Given these symptoms, the first thing to check is like Gary
says, i.e. see if 
amavisd-nanny reports any processes that 'went away' from
the last time
the amavisd-nanny was run. It needn't be running all the
time, but it makes
a prudent habit to run it for few seconds every few days,
and see if it has
anything to report. Any instance of 'went away' should be
investigated,
unless you already know what might have been a cause (like a
disk full).

After you notice a case of lost or runaway process (either
reported by
amavisd-nanny, or noticing a leftover directory, or seeing
Postfix log
entry on 'lost connection with localhost'), the next step
is to grep the
log for that specific id, and see how processing of that
message
went, and what was the last thing reported in the log for
that specific id.
In order for this step to be useful, it is best to have a
log level 5 (or 4),
to be able to see at what stage of mail checking processing
got stuck.
Besides looking for processes that never finish mail
checking,
notice also cases where mail checking does finish, but way
after Postfix
has already given up and logged 'lost connections' -
timestamps are an
obvious clue in such cases.

I keep two syslogd entries for amavisd, one to log regular
level-0 entries
for archival an user support purposes, and another to a
separate file,
at log level 5 and at syslog priority debug, which can be
rotated often and 
need not be archived, but it provides useful information if
it turns out that 
a lost or runaway processing occurred during last few days.
One may
throw-in an additional medium-level log file, when one is
interested in TIMING 
reports and a little more detail that log-0 entries. Example
syslog.conf:

user.notice  /var/log/amavisd.log
user.info    /var/log/amavisd-info.log
user.debug   /var/log/amavisd-debug.log

On Linux don't forget to prefix filenames with a '-'
to turn off syncing after every write.

Corresponding amavisd.conf setting could be:

$DO_SYSLOG = 1;
$SYSLOG_LEVEL = 'user.debug';
$log_level = 5;


  Mark


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking
scripting language
that extends applications into web and mobile media. Attend
the live webcast
and join the prime developer group breaking into this new
coding territory!
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )