Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Are there good reasons to increase a connect timeout?

jduprezMay 20 2010 — edited May 20 2010
Hello,

I have a JAX-WS client (please don't move this thread :o) that sometimes experiences connect timeouts while connecting to an Apache proxy (itself fronting a Glassfish server which hosts my web service implementation).
My logs seem to demonstrate that the connect timeout expires after 20 seconds. I have no idea what a reasonable timeout should be, but I found [this year-old reply|http://forums.sun.com/thread.jspa?messageID=10770903#10770903] where ejp states that the default timeout is around 75s.
I therefore infer that the JAX-WS library sets an explicit connect timeout or ~20 seconds.

I haven't found a doc confirming if, and why, JAX-WS would set specify this timeout value - if +"75 seconds is more than enough! "+, is 20s enough?

More importantly, I am wondering whether it makes sense to increase this timeout. If I understand correctly, it is a client-side setting (how long does the client wait for the server to accept the TCP connection request), that should be adapted only if the network or server capabilities make it likely that a connection stays pending this long.

As far as the server goes:
it is an Apache server (the fact that is proxies to a GF back-end is irrelevant I think, as the client trace shows that Apache itself did not accept the connection), which is not known for discontinuing the servicing of HTTPS requests under moderate load.
The Apache server handles the SSL "layer".
The node hosting Apache is a VMWare host that has plenty of free CPU and local ports, if that changes anything.

Would you direct me towards increasing the client timeout, or towards tweaking the Apache conf to accept more connections, or towards whatever my ridiculous understanding of networking has led me to not consider?

Regards,

J.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2010
Added on May 20 2010
5 comments
897 views