I have an Apache 2.2 running on ubuntu 11.4 with 16Gb RAM, for image hosting from mobile phones through GPRS,since connection is slow i have enabled keepalive and set time out to 6,**based on average loading time.But usually even with 10-20 users apache is reaching its max_clients of 300 and preventing further connections.But the interesting thing is even **with keepalive turned OFF Apache is reaching its maxcients and refuses to accept new connection

the issue was with COnfiguration i have set Allowoverride None for /var/www/ ,but i thought it would increase performance and security since with Allowoverride All,then a request for index.html apache have to look for .htaccess inside /.htaccess /www/.htaccess,/www/htdocs/.htaccess etc,which affects performance badly.isnt that so???.After Changing this spawning of children is normal.
– ananthanApr 21 '12 at 7:51

Like adaptr, swith to the 'worker' MPM and scale to thousands of concurrent connections.

Note that the maximum duration of your connections is also controlled by the TimeOut Apache parameter : set it to a low value, because it is an 'idle I/O timeout' value. Well, not to low since GPRS clients are slow, but the default of 300 seconds is way to high.

Even with the 'TimeOut' parameter set to a low value, the clients still decide how many time they will hold a connection open. You might want to check mod_reqtimeout (http://httpd.apache.org/docs/2.2/mod/mod_reqtimeout.html) which helps a lot in at least blocking slowloris-like attacks.

It is possible to define other timeouts, but it depends on specific modules/usages. I control more stringent timeouts via mod_proxy and mod_fcgid. When it's possible to force a connection to never use more than N wallclock seconds, you know exactly what's your nominal arrival rate before your MaxClients is reached (it's MaxClients / N new conn/sec). It depends a lot on what you are running within your Apache.