On Sat, 12 Apr 2008, Peter J. Holzer wrote: > On 2008-04-11 15:20:21 +0000, R wrote: > > On Fri, 11 Apr 2008, Charlie Brady wrote: > > > I suspect that the only reason you hit the limit was because some plugin > > > was not returning. I suspect that qpsmtpd wasn't actually hanging, it > > > just wasn't accepting more connections. > > > > Tracing a non-returning plugin could be very difficult :-( > > Shouldn't be that bad. If you run at log level LOGINFO, all calls to > plugins are logged (in vanilla 0.32, if you are using my RPMs, you need > LOGDEBUG). The "Too many connections: ..." message is also at priority > LOGINFO, so if you are running at a higher log level, that explains why > you don't see that message.
I set up from scratch. I do get that log message for too many connections from the same IP. I'm set for LOGNOTICE, though all of my "comment" logging is LOGCRIT - I think all plugins used are highly customized for this particular site. > Then wait until you have several processes which appear to be hanging > (you probably don't have to wait until you have 31 of them), and look > at the log entries of these processes. The guilty plugin should show up > in the last entry of each process. I'll keep this suggestion in mind. I may wait until I build a new server, then set it to a low number of connections and hammer it. > > Seems strange that all those connections might hang at the same point. > > What do you mean with "point"? "Point in code" or "point in time"? More like "both at the same time." > The former seems quite natural to me. If there is a bug in some plugin > which causes the plugin to hang of course all processes will hang at the > point where the bug is. Agreed. It seems unusual to me that it would happen with ALL 31 connections, which would all stay hung for several hours before I discovered it and restarted forkserver. It sounds more, to me, as if the 32nd connection triggered something that hung all of the connections, permanently. After all, I've never had a connection hang otherwise. It's not like if a connection hits a particular plugin, it stays stuck until the connections fill up and I discover one day that they have all filled up. I check the current connections many times per day, and they contstantly change - no hangs, but a noticable number of disconnections - the other end stalls and gives up the connection. > As for the latter, I don't think that is happening. It is more probable > that number of hanging processes is slowly increasing. Unless you are > monitoring for long-running qpsmtpd processes you won't notice this at > first (if you have 10 hanging processes, you can still accept 20 mails > in parallel). Only when the number of hanging processes approaches your > limit, you will notice that less and less mail gets through until when > you hit the limit, no new connections are accepted at all (which is > probably the point where users start to complain). As I indicated, I monitor connections a lot - just grep the for forkserver processes. They usually range from 5-20 at any one time, and they constantly change. I think it's too much of a coincidence to suggest that 31 connections gradually, or even quickly, got filled and hung at the same point in a plugin. When I tried a manual connection, there was neither logging nor any kind of response from qpsmtpd to my telnet to port 25. Thank-you.