Comet implementation with AJAX and PHP (on Apache) drops connections

Confused_Girl

New Member
I'm implementing Comet with long-polling AJAX and Apache/PHP. The problem is that if there is not interaction in a (unknown for me) period of time, ie, no data sent/received, and then after some time, I send an event, the client-side long-polling request keeps pending without receiving the new data. Sometimes client-side receives a timeout and reconnects, but sometimes it doesn't receives anything and, as I already said, the request keeps pending.I'm implementing it as indicated here with some alterations unrelated to the comet implementation per se (ie: using database instead of file). It uses a loop on the server-side waiting for new events and seems that server timeout closes the connection but client doesn't receives the connection close for reconnecting.How can I avoid this problem? Would the solution be using a client-side timer for reconnecting?
 
Back
Top