Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Timeouts, how long, and why do we use them

Boris Berenberg - Atlas Authority
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

With Atlassian applications there are typically 2 places where you can set timeouts. The first is within Tomcat itself. The second is in your proxy. I contend that timeouts are misunderstood and as a result, misconfigured.

From the Tomcat Connector Docs:

If JK aborts waiting for a response, because a reply timeout fired, there is no way to stop processing on the backend. Although you free processing resources in your web server, the request will continue to run on the backend - without any way to send back a result once the reply timeout fired.

For your proxy, since it has no way to kill a backend job, it also does essentially the same thing.

But what does this mean for us practically? I think it's easier to illustrate with an example:

  1. User exports a large number of issues from Jira
  2. Timeout kills the connection before the user receives their results
  3. The export continues to run in the background utilizing JVM resources
  4. User sees this as a failure and goes back to #1
  5. We now start building up more and more of a backlog of running jobs

This is of course an extreme example, but in practice this kind of thing does happen. Especially across a variety of users and operations. Most importantly, the timeout in this case is not bringing any value to end users, and especially not to application administrators.

I propose that unless you have a very good reason to specify low timeouts that you set them exceptionally high. 

I would love to hear counterpoints that I may not have thought of.

1 comment

Comment

Log in or Sign up to comment
Nguyen Tran
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2018

What would be an "exceptionally high" timeouts in your opinion? I normally just leave the default timeout for tomcat.

Boris Berenberg - Atlas Authority
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2018

I tend to set it anywhere from 10-30 minutes.

Nguyen Tran
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2018

When the timout is long, the user get impatient and refresh the browser. That would also build up more running job on the server right? I noticed that user tend to refresh their browser after 3-4 minutes.

Boris Berenberg - Atlas Authority
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 9, 2018

This is a possibility, but with a timeout, it is a certainty. I prefer the prior 🤷

TAGS
AUG Leaders

Atlassian Community Events