It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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.

 

3 comments

Fadoua Community Leader Mar 06, 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 Mar 07, 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!

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

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you