Re: [users@httpd] Is there a "real" maximum number of connections?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/28/06, Charles A. Landemaine <landemaine@xxxxxxxxx> wrote:
I did some research and found out the # MaxClients variable defines
the maximum number of concurrent connections. I'd like to know if we
can define this variable to something like 2 millions.

I'm asking because I'm designing a chat application that people are
going to use through a web browser, and the connection to the server
will remain open for a minute, then the connection is closed and
reopen right away. The community is pretty large (several million
people).

Using open connections is probably the best way to handle the maximum
number of users per server, instead of querying each second for new
messages for instance. The only concern I have right now is how Apache
behaves with millions of concurrent open connections.
Thanks,

--
Charles A. Landemaine.


PS: Is there a way to search through
http://mail-archives.apache.org/mod_mbox/httpd-users/ ?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

 
 
I don't think that you can support a million connections on apache, are you running this app on a mainframe, also check to see how much Memory each child/worker thread would take up, as you would need ( 1Million * (RAM/thread)) of Memory , so say if each connections takes up 1Meg or even 500KB you would potentially need 1 Million Megs of Memory ~= 1000GB ~= 1TB of Memory....Anyway coming to your question ....
 
Apache has some preset hard limits on the mac-clients setting defined in the file
"/<SRC>/apache_1.3.33/src/include/httpd.h"
 
Here is the line that references the setting ....
 
/* Limit on the total --- clients will be locked out if more servers than
 * this are needed.  It is intended solely to keep the server from crashing
 * when things get out of hand.
 *
 * We keep a hard maximum number of servers, for two reasons --- first off,
 * in case something goes seriously wrong, we want to stop the fork bomb
 * short of actually crashing the machine we're running on by filling some
 * kernel table.  Secondly, it keeps the size of the scoreboard file small
 * enough that we can read the whole thing without worrying too much about
 * the overhead.
 */
#ifndef HARD_SERVER_LIMIT
#ifdef WIN32
#define HARD_SERVER_LIMIT 1024
#elif defined(NETWARE)
#define HARD_SERVER_LIMIT 2048
#else
#define HARD_SERVER_LIMIT 256
#endif
#endif
As you can see the Hard_Server_Limit is set to 256, so in this case the Max_Clients setting can be atmost 256, so if you plan on increasing it change the setting here in the file httpd.h on the line relating to your OS, and recompile apache , and then change the Max-Clients Setting in httpd.conf..
 
Kishore Jalleda
 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux