How to set connection timeout with Jetty 9.2.10? [message #1712629] |
Mon, 26 October 2015 19:21  |
Eclipse User |
|
|
|
I am using Scalatra 2.4 with Jetty 9.2.10 and I am unable to set the connection timeout to 60 seconds.
I have tried both by adding the following to the web.xml
<session-config>
<session-timeout>60</session-timeout>
</session-config>
and by using connector.setIdleTimeout
def main(args: Array[String]) {
val server: Server = new Server
val http_config: HttpConfiguration = new HttpConfiguration
val connector: ServerConnector = new ServerConnector(server, new HttpConnectionFactory(http_config))
val context: WebAppContext = new WebAppContext
connector.setPort(8099)
connector.setIdleTimeout(60000)
context setContextPath "/"
context.setResourceBase("src/main/webapp")
context.addEventListener(new ScalatraListener)
context.addServlet(classOf[DefaultServlet], "/")
server.setConnectors(Array(connector))
server.setHandler(context)
server.start()
server.join()
}
still, the connection with return Gateway timeout after 30 seconds.
Can somebody tell me what am I doing wrong? Thanks!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09873 seconds