How to change Grizzly web server’s timeout from 5 minutes to 30 minutes

timeoutweb

I'm using Grizzly web server version 1.9.27. This server is used to provide clients with large amounts of data (over HTTPS, if that's relevant). Currently the server timeouts after 5 minutes. In other words, if a user is downloading a large amount of data, after 5 minutes, the HTTP(S) request processor is interrupted by Grizzly.

I need to increase it to at least 30 minutes.

I can't find any configuration file or any relevant information on Google to raise this timeout.

Any ideas?
Thanks

EDIT : (in response to DerfK) just checked the data and am seeing two different 'timeout' scenarios:

1- Server receives a request, asks the data manager to get the data. The data manager takes more than 5 minutes…during this time, there is no traffic between Grizzly and client.

2- Data server returns massive amounts of data which is transmitted to the client, but takes more than five minutes (because there is so much data).

First priority is solving problem 1, timeout when the connection is idle.

(I had to remove tag 'Grizzly' because I don't have enough points to create a new tag. I apparently do have enough points to create grizzly tag in stackoverflow…where this question was originally posted)

Best Answer

This code did the trick (for idle timeout):

GrizzlyWebServer ws;

ws.
   getSelectorThread().
   setKeepAliveTimeoutInSeconds(-1);