Olaf van der Meer wrote:
> Hello,
> 
> Recently we have updated the ICS components and now we have some
> problems with the webserver. 
> In the old version every time a browser makes a request to the
> webserver a new connection were created and connected, and afterwards
> the connection were disconnected and destroyed.

It depends entirely on the client/browser. Only if it either uses 
HTTP 1.0 without the "Connection: Keep-Alive" header or >= HTTP 1.1 with 
the "Connection: close" header the connection will be closed after each
request, that is how HTTP works. 
  
> In the new version just one connection is created and connected (even
> if the browser makes several requests to the server). 

See above, it has not changed. 

> The connection will be reused untill it expires so much seconds as set by the
> property KeepAliveTimeSec of the webserver component. Only after the
> KeepAliveTimeSecs the connection is disconnect and the object will be
> destroyed. 

Yes, you can turn this feature off by setting both KeepAliveTimeSec and
MaxRequestsKeepAlive to zero.
    
> 
> So the problem is: the old connection is reused and it contains data
> which could not belong to the request.

Then it is your application that is buggy. 
 
> 
> I have tried to set the KeepAliveTimeSec to zero which should disable
> the KeepAliveTime feature entirely (read from the svn-changelog), but
> then the connection still stays connected. It is even worse. Now it
> stays connected untill god knows how long. It is not predictable how
> long the connection is active.

Well, it's the same behaviour as in previous versions, there is no timeout 
specified, hence if a client requests a persistent connection it is not 
closed until the client disconnects or requests a connection close. 
    
> 
> I also tried to force the connection to close with the procedures
> Close en CloseDelayed after the answer is send. But then the answer
> is not send completely with half html pages as results.  
> 
> Do you have any suggestions how to handle this?

Set the MaxRequestsKeepAlive to "1" (one).
However your server application should be able to handle persistent
connections.

-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to