This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Tomcat and the fly likes socket_keepalive, what is it for Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "socket_keepalive, what is it for" Watch "socket_keepalive, what is it for" New topic
Author

socket_keepalive, what is it for

John Smith
Greenhorn

Joined: Aug 21, 2006
Posts: 13
My understanding is that it is used to keep connection between tomcat/IIS or tomcat/Apache open if they reside on different machines, it is not used to keep the browser/IIS or browser/Apache connection. And It cannot be used in Tomcat standalone server. Am I right?

My situation is:

Our company firewall/proxy server have a timeout limit, it will kill any idle connection of more than 5 minutes. Unfortunately some of the request take a long time to process, so the client-server connection will be dropped before the server can present the page. What I want is to configure Tomcat or Apache so that it can send out keep-alive packet while processing the long request, so the connection won't be killed by proxy.

The only thing I can find is socket_keepalive, but it doesn't solve the problem. Does anybody know if I can configure Apache or IIS to do the same thing?

I need to point out the keepalive I am talking here is not persistent connection, that is for multiple requests to share a same connection.

Thanks! BTW, we mainly use JSP, we cannot rewrite or redesign our code now since it is heavily depened on a third party package, so that is not an option.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Where are you seeing socket_keepalive?

Five minutes is a long time to keep an HTTP connedection alive.
Often the browser will time out and close the connection if the server doesn't.

Have you considered breaking the functionality into it's own thread and returning immediately to a status page instead?
You could then write a mechanism for the user to check back every so often to see if it's done or even send an email to the user when the process has completed.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: socket_keepalive, what is it for