Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

504 Gateway Time-out on PDF export

Pini Shvartsman November 8, 2020

I'm getting a 504 Gateway Time-out when I try to export to PDF.

this is the stack trace:

08-Nov-2020 15:40:07.040 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8090-exec-6] (id=[182]) has been active for [64,184] milliseconds (since [11/8/20 3:39 PM]) to serve the same request for [****/spaces/flyingpdf/pdfpageexport.action?pageId=327726] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck.
java.lang.Throwable
at java.base@11.0.7/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base@11.0.7/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.base@11.0.7/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.base@11.0.7/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.base@11.0.7/java.net.SocksSocketImpl.connect(Unknown Source)

1 answer

0 votes
Daniel Ebers
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.
November 9, 2020

Hi Pini,

this leads to the assumption that the export is too big to execute in a timely manner leading to a timeout. Probably (while not sure) this is related to a memory shortage but it needs further inspection.

Does this happen recently "at once" or did you upgrade Confluence before?
Could you please share some basic specs about your instance (number of spaces/pages/users + amount of memory assigned to the JVM would be helpful)?.

Please also review the following article if it matches:
https://confluence.atlassian.com/confkb/confluence-times-out-when-trying-to-export-a-page-to-pdf-990551836.html

In case you could provide more details a Confluence-versed user here on Community might be able to advise with more details.

Cheers,
Daniel

Pini Shvartsman November 11, 2020

Thank you for the response.

I looked over this article and there is no problem with the server memory.

I also changed the configurations for the timeout in Nginx on the server and it still fails (after long minutes)

The current Confluence setup is on a new server but the old setup was running on a similar server but I didn't have those issues with the export.

Daniel Ebers
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.
November 11, 2020

Is it in your case also given that the PDF is correctly stored in temp folder (despite the UI is showing an error) as documented in this bug?
https://jira.atlassian.com/browse/CONFSERVER-36883

Are there error messages in logs that correspond to the information put in the bug report?

A more general question: which version of Confluence is it exactly you are running?

Pini Shvartsman November 11, 2020

The temp folder does not contain the PDF:

Untitled.pngas for the logs, this is the only log I can see:

 

 

11-Nov-2020 12:37:19.288 WARNING [Catalina-utility-2] org.apache.catalina.valves.StuckThreadDetectionValve.notifyStuckThreadDetected Thread [http-nio-8090-exec-2] (id=[179]) has been active for [66,948] milliseconds (since [11/11/20 12:36 PM]) to serve the same request for [https://URL/spaces/flyingpdf/pdfpageexport.action?pageId=2850818] and may be stuck (configured threshold for this StuckThreadDetectionValve is [60] seconds). There is/are [1] thread(s) in total that are monitored by this Valve and may be stuck.
Daniel Ebers
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.
November 13, 2020

Could you please confirm on the version of Confluence that you are running?

Pini Shvartsman November 13, 2020

Powered by Atlassian Confluence 7.8.3

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events