Thanks for all of the help everybody.  The solution I finally came up
with was to set the MaxClients variable.  On an interesting note though, I
did some tests with apache using the prefork and worker mpm's and it turns
out that qpsmtpd runs very nice under both, but scales better on the
worker mpm.  Here is my config (using the worker mpm) for anybody that is
interested:

--------- START CONFIG ----------
User smtpd
Group users

Listen 0.0.0.0:25
HostnameLookups On
ServerName HOSTNAME

LoadModule perl_module modules/mod_perl.so

ErrorLog /hd/apache/error_log
TransferLog /hd/apache/access_log
LogLevel warn
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/apache_status

StartServers    30
MinSpareThreads 10
MaxClients      90
ThreadsPerChild 30

<Perl>
        use lib qw( /home/smtpd/qpsmtpd/lib );
        use Apache::Qpsmtpd;
</Perl>

<VirtualHost _default_:25>
        PerlSetVar QpsmtpdDir /home/smtpd/qpsmtpd/
        PerlModule Apache::Qpsmtpd
        PerlProcessConnectionHandler Apache::Qpsmtpd
        PerlSetVar qpsmtpd.loglevel 7
</VirtualHost>

---------- END CONFIG -----------

While it is possible to just set the MaxClients way up, in my testing when
apache got up around 130 connections it just couldn't recover nicely. 
Don't really know why, but the box (vmware session) would just "hang". 
Hope this helps somebody out there.

Ed.



On Thu, 05 Oct 2006 11:32:25 -0500, Peter Eisch wrote:

> 
> In my instances I couldn't figure out the right number for limiting
> connections.  It got problematic when roadwarrior SMTP AUTH users were
> unable to connect reliably.
> 
> Is the specific problem you're looking to solve simply connection limits or
> is there a different situation that you want connection limits to solve?  If
> may anticipate the answer as being the latter....  I keep the system from
> drowning from massive waves by using the loadcheck plugin.  They can then
> take the plethora of connections but when spamd starts sucking cpu to
> service the connected MTAs, it will just fire back a soft error.  I've had
> very good experiences from this approach as well as when I was running the
> tcpserver framework.
> 
> If you are specifically looking to limit connections, I'm sorry but I have
> no solution.
> 
> peter

Reply via email to