Troubleshoot Microscope

Reverse Proxy Timeout Workaround

504 Gateway Timeout 

In exceptional circumstances, when running a very lengthy audit with Microscope, you may see a 504 Gateway Timeout error display on your page informing you that your audit has timed out.

Why does this happen?

This issue occurs because the request to complete the audit takes a longer amount of time than is allowed by a type of proxy server known as a reverse proxy server, operating in your network. A reverse proxy server is a computer that can be placed in your network, which aims to improve performance and security.

This means that, when you access Jira, you don’t connect directly to the Jira instance. Instead, your request goes via the reverse proxy computer, then on to the actual computer running Jira. The diagram below illustrates these differences.

As shown in the diagram above, the following steps are taken:

  1. You click the Audit button, and that request is sent to the reverse proxy.

  2. The reverse proxy decides where the request should go and forwards it to your Jira instance.
    At this point, the reverse proxy waits for a response from Microscope, installed in Jira. If it doesn’t get a response within a pre-determined amount of time, you will receive an error.

  3. You receive a timeout error response, instead of the audit results.

  4. Later, the scan finishes and the audit finally completes, but the reverse proxy has moved on to bigger and better things!

Workaround

At some point in the future, we’d like to update our plugin to avoid this issue altogether. Whilst you wait, however,  it is possible to work around the problem.

All you need to do is increase the timeout to allow time for Microscope to respond to the incoming request.

The timeout value on all common reverse proxy servers is manageable. That means, it can be changed to suit your requirements. Unfortunately, because there are so many different configurations, we are unable to give you precise instructions as to how you can make this change. But, if you speak to your network infrastructure team, they can make this change for you. 

On this page