| Type |
Task
|
| Priority |
Normal
|
| Assignee | |
| Version |
none
|
| Sprints |
n/a
|
| Customer |
n/a
|
Iterations
-
tigase-server-8.5.0 Open
Issue Votes (0)
| Type |
Task
|
| Priority |
Normal
|
| Assignee | |
| Version |
none
|
| Sprints |
n/a
|
| Customer |
n/a
|
We do have an option to limit request timeout, e.g.:
However, it seems it doesn't work with asynchronous execution.
The assumption would be that
AsyncContext asyncCtx = request.startAsync(request, response);either would:ServerConnectortimeout set withconnector.setIdleTimeout(timeout);It turns out, that neither is true and if the timeout is not set explicity (or disabled with
0) then it would use the default. As perjavax.servlet.AsyncContext#setTimeoutdocumentation (link to jakarta even though Tigase 8.x still usesjavaxbut the thing didn't change):It seems this mostly applies to async groovy rest handlers, which should define it's own timeout and make a call to the callback when it finishes so possibly the async handling should respect that, thus setting it by
asyncCtx.setTimeout(0)intigase.http.modules.rest.OldGroovyRequestHandler#executeAsyncwould be one solution. However, in case of impropper handling it would lead to requests hanging thus having follow global timeout seems more correct.@andrzej.wojcik However, most of it will be removed in 9.0 so maybe silly workaround for 8.x in
tigase.http.jetty.JettyStandaloneHttpServer#createConnector(org.eclipse.jetty.server.Server, tigase.http.jetty.JettyStandaloneHttpServer.PortConfigBean):Would be enough?