Recently, my Apache HTTP server was broken down twice. The scenario was when visiting a page, it was just waiting there, blank. And I checked the server through SSH and saw that there was a lot (about 50) of inner 8009 connections. After restarting Apache HTTP Server and Tomcat Server, these connections decreased to less than 10 connections.
Client <-Kept Connection-> Apache HTTP Server <-AJP Connector (8009 Connection)-> Tomcat
When a user is connected, an AJP Connector is setup for him/her. The connection will not be tore down until the user disconnects from Gtalk or MSNLive service. So if there are more than 50 users online, there are no doubts that the server crashes.
To solve this problem, one solution would be not using Apache HTTP Server in the middle of Tomcat server and browser client. So there is no limitation on AJP connections.
And another solution would be monitoring user connections on Tomcat server side, and if there are more than 50 connections, try to switch application’s Comet-mode into Query-mode smartly.
Providing Comet applications need to solve a lot of unknown problems.