My product needs to send data to the client, and then later send the client more data, over the same connection. HTTP/1.1 created Keep-Alive connections for this reason. I tried setting the response header 'Connection' to 'Keep-Alive', but Zope closes the connection anyway. So, I made an infinite loop in the function that is called when the connection is first opened, which keeps the connection open. Within the loop, the sleep function is called to sleep for 1 second, otherwise Zope sucks up all my unused CPU cycles. But, after I get 2 or 3 of these loops going, the whole Zope server locks up. It won't accept any connections. Is there a different way I can keep connections alive without locking up Zope or using all the system's CPU cycles? -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup
Matt Ficken wrote at 2003-5-17 13:12 -0500:
My product needs to send data to the client, and then later send the client more data, over the same connection. HTTP/1.1 created Keep-Alive connections for this reason. I tried setting the response header 'Connection' to 'Keep-Alive', but Zope closes the connection anyway.
It was not for that reason! HTTP/1.1 allows the server to close a connection at any time.
... Is there a different way I can keep connections alive without locking up Zope or using all the system's CPU cycles?
Do not use HTTP when your application needs persistent connections. Dieter
participants (2)
-
Dieter Maurer -
Matt Ficken