Hi Oleg,
Thankyou for such a prompt response. Unfortunately I am already
disabling stale checking as I had read somewhere it might help (and
it increases performance slightly) - i.e.:
2006/01/25 17:43:53:102 GMT [DEBUG] DefaultHttpParams - Set parameter
http.tcp.nodelay = true
2006/01/25 17:43:53:102 GMT [DEBUG] DefaultHttpParams - Set parameter
http.connection.stalecheck = false
Regards,
Tim
On 25 Jan 2006, at 17:46, Oleg Kalnichevski wrote:
On Wed, 2006-01-25 at 17:37 +0000, Tim Putnam wrote:
Hi all,
I've got httpclient bolted onto apache axis, and I'm using it in a
fairly heavy performance scenario to make a lot of web service
requests (its going over SSL).
I spent a lot of time carefully setting it up, and, under windows, my
application works perfectly. The multi-threaded connection manager
keeps the connections persistent. Performance is reasonable (although
it spends a lot of effort decrypting ssl - any faster implementations
out there?)
Under linux however, using exactly the same code, and the same
libraries, I have problems. After a while of usage (particularly
during heavy use) the connection manager runs out of connections, and
will often end up in a state where it fails. I get lots of
ConnectionPoolTimeoutExceptions, and it won't respond. Occasionally
it'll recover, usually not.
Using netstat on windows, I see a neat set of established https
connections which remain static. All perfect.
Using lsof on linux, the connections are always changing, and I get
things like the following (on windows I just get established):
java 7043 root 208u IPv4 4635195 TCP somewhere:
45761-> somewhere:https (ESTABLISHED)
java 7043 root 209u sock 0,5 4635227 can't
identify protocol
java 7043 root 210u IPv4 4635197 TCP somewhere
k:45763-> somewhere:https (ESTABLISHED)
java 7043 root 211u IPv4 4635198 TCP somewhere
k:45764-> somewhere:https (ESTABLISHED)
java 7043 root 212u sock 0,5 4635214 can't
identify protocol
java 7043 root 213u IPv4 4635202 TCP somewhere:
45768-> somewhere:https (ESTABLISHED)
java 7043 root 214u IPv4 4635203 TCP somewhere:
45769-> somewhere https (ESTABLISHED)
java 7043 root 215u IPv4 4635204 TCP somewhere:
45770-> somewhere:https (ESTABLISHED)
java 7043 root 216u sock 0,5 4635205 can't
identify protocol
java 7043 root 217u sock 0,5 4635206 can't
identify protocol
java 7043 root 218u sock 0,5 4635207 can't
identify protocol
The list varies in length. I get what appears to be left over
connections, and the number of handles will eventually "peak" above
the max number of connections (regardless of what its set at).
Occasionally large swathes of them seem to disappear, only to be
rapidly replaced by new connections.
I assume it must be some difference in the way sockets are handled on
linux.
This is running under j2se 1.50_06.
Any help would be hugely appreciated,
Tim
Just the very first thing from the top of my head: disable the stale
connection check and see if that makes any difference. For details see
the HttpClient optimization guide:
http://jakarta.apache.org/commons/httpclient/performance.html#Stale%
20connection%20check
I suspect strongly the stale connection check simply does not work
with
some JSSE impls + OS combinations
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-
[EMAIL PROTECTED]
For additional commands, e-mail: httpclient-user-
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: httpclient-user-
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]