Knowledge Nuggets: Reverse proxy timeouts

Has this ever happened to you? You're working in Jira, maybe doing something like running an Integrity check, and WHAM, after loading for a while the page just stops and gives you an error.

Error.pngWell, maybe it's not this exact screen. If you get a generic 504 or 50x black text on a white background, it's time to think about customizing your reverse proxy's error page. (you are using a reverse proxy, right?) But that's a post for another day!

Today we're looking at why you hit that error page. Timeouts! By default, nginx and Apache will stop trying to connect to Jira if it doesn't finish responding to a request in 30 seconds. Normally this would be fine, because normal pages only take a few seconds at most to load.

But say you're doing something like running the Integrity Checker on a large instance. That single page could take several minutes to load, because it takes a long time for the Integrity Checker to execute! Once it hits 30 seconds of waiting, your reverse proxy is going to give up and return an error to you instead of continuing to wait for Jira. Oh no! If you want to get the results from the Integrity Checker, you're going to need to open up your reverse proxy configuration and increase that limit. nginx is my proxy of choice, so check out the Apache documentation or your own relevant proxy if you're using something else.

In the configuration for our instance, I've tweaked the default timeout to 60 seconds (some people insist on loading filters with large pagination - we'll get to that in a minute) and provided explanations for the values in comments so future administrators will be informed. Feel free to copy this straight in:

 # The read timeout is the primary "how long will I see a white screen before I get an 500 error message from nginx" - see these values:
# Application restart - set to 5s (will show people an error message sooner instead of an eternally-loading whitescreen) - note this isn't useful after Jira 7.2 because Jira includes its own "starting up" page
# Normal operation - 60s
# If you need to use the Integrity Checker - 500s
proxy_read_timeout 60s;

Now about those large filters! Have you ever had a bulk change with a lot of issues time out on you? Had to try the bulk change again with smaller amounts of issues? That read timeout is actually coming to your assistance here! Take a look at the search you're starting with, and see what columns are selected in List view:

image.png


The more columns that are selected, the more work Jira has to do during a bulk change to render all the items in those columns up to the max number of issues - maybe 1,000! If you're about to do a bulk change, save yourself some headache and uncheck everything except the Key, Issue Type, and Summary. You'll be amazed at how much faster the bulk change screens load, and you won't encounter issues with a timeout.

 

5 comments

Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2018

@Daniel Eads {unmonitored account}Got frustrated with that page many times. Thank you for this article! I also wanted to mention that Tunneling helped me some times with the timing out since we didn't want to increase the time for a page to load. Again thanks!

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2018

Problem with Integrity Checker is very annoying an for me this should already be improved in JIRA. It does not have any progress bar or does not reload after each stage if want to check more than one. It should be definitely redesigned!

Claudia Armentano December 18, 2018

Hi,

When i run an integrity checker in my JIRA server instance it times out and gives me 504.

I use nginx for proxy.

the settings that i have for parameter  proxy_read_timeout is 300s, however i still get the time out error.       proxy_read_timeout 300s;

Any suggestions of how miuch the time limit should be?

 

Best Regards

Alexey Polovintchik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 5, 2020

We have a large Jira database and if we select all the items in the Integrity Checker, it may run from 30 min to one hour or even more.

I really do not want to have 1h as timeout value for my proxy, because it would have some other undersirable effects, like lots of dead sessions. 

I agree that the page must be redesigred. It must have a progress bar or just do regular refresh.

Full reindexing can also run for hours, but it has a progress bar and it keeps the page from "proxy timeout" problems.

Ulf Johansson
Contributor
May 25, 2023

Hi!
If you have access to server you can open Jira with localhost:8080 and run Integrity checker.
Then you bypass proxy.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events