Public side PDF throws Gateway Time Out

42 views
Skip to first unread message

Blake Graham-Henderson

unread,
Feb 18, 2026, 11:15:23 AMFeb 18
to archivesspac...@lyrasislists.org
All,

I'm sure this list is tired of PDF threads. I've combed over all of the
previously posted questions about PDF export and I didn't find one that
addressed this issue specifically. We have a particularly large Finding
Aid. And when the system attempt to produce a PDF for the user, it takes
awhile and eventually times out. Watching the server logs, I can see
that the server is still working on the PDF at the moment the browser
throws a time out.

I think I can conclude that the front-end doesn't tolerate the backend
taking longer than x minutes (maybe 2 minutes?) to finish the request.
Is there anything we can do about that? We're using NGINX reverse proxy
with standard settings. I'm wondering if it's in the NGINX layer or of
it's in the Java web server layer. Or maybe it's not a good idea to
increase the timeout threshold? Or maybe this has come up before and I
didn't see it in the backlog.

--
-Blake-
Conducting Magic
Will consume any data format
MOBIUS

Blake Carver

unread,
Feb 18, 2026, 11:46:08 AMFeb 18
to archivesspac...@lyrasislists.org
That's probably nginx timing out, those big PDFs can take forever to finish. Try bumping up the timeouts in nginx. 
Probably some combination or all of: proxy_connect_timeout, proxy_read_timeout, proxy_send_timeout, send_timeout 

From: archivesspac...@lyrasislists.org <archivesspac...@lyrasislists.org> on behalf of Blake Graham-Henderson <bl...@mobiusconsortium.org>
Sent: Wednesday, February 18, 2026 11:15 AM
To: archivesspac...@lyrasislists.org <archivesspac...@lyrasislists.org>
Subject: [ArchivesSpace Users Group] Public side PDF throws Gateway Time Out
 
--
You received this message because you are subscribed to the Google Groups "Archivesspace_Users_Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Archivesspace_User...@lyrasislists.org.
To view this discussion visit https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fa%2Flyrasislists.org%2Fd%2Fmsgid%2FArchivesspace_Users_Group%2F41a4dda0-0555-4679-90a2-bffd24f1d9bf%2540mobiusconsortium.org&data=05%7C02%7Cblake.carver%40lyrasis.org%7C9bf3ab2107a146c68a4d08de6f08eb77%7C5728cf0c0652430caecdf311d1d5020f%7C0%7C0%7C639070281325585191%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=KGVm0sM%2BvhxAKMUYH45PXuQsHWgO4kjgzfT5nfxeT9g%3D&reserved=0.

Saunders, Mike

unread,
Feb 18, 2026, 11:46:43 AMFeb 18
to Blake Graham-Henderson, archivesspac...@lyrasislists.org
Not sure if this is what you're looking for - in the config.rb (starting at line 492 of the standard/unedited config.rb) there are some options to set the timeout to longer (or set it to 0 for no timeout at all, which might be a bit much but good for debugging):

# The number of PDFs that can be generated (in the background) at the same time.
#
# PDF generation can be a little memory intensive for large collections, so this is
# set fairly low out of the box.
AppConfig[:pui_max_concurrent_pdfs] = 2
# You can set this to nil or zero to prevent a timeout
AppConfig[:pui_pdf_timeout] = 600


Mike


Sent: Wednesday, February 18, 2026 4:15 PM

To: archivesspac...@lyrasislists.org <archivesspac...@lyrasislists.org>
Subject: [ArchivesSpace Users Group] Public side PDF throws Gateway Time Out

External Email: This email originated from outside of the National Library of Scotland. Do not click links or open attachments unless you have verified the sender and know the content is safe.
--
You received this message because you are subscribed to the Google Groups "Archivesspace_Users_Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Archivesspace_User...@lyrasislists.org.
To view this discussion visit https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furl41.mailanyone.net%2Fscanner%3Fm%3D1vskD1-000000006Wa-29Xp%26d%3D4%257Cmail%252F90%252F1771431000%252F1vskD1-000000006Wa-29Xp%257Cin41g%257C57e1b682%257C11029744%257C13642207%257C6995E59FBD542CE62CDA069ED98A5390%26o%3D%252Fphtr%253A%252Fgtsosoulgogp.%252Foe.y%252Falcmsiraslitssmg.ogd%252Fsr%252FiAidechv%252FrUassee_spcpGrs4ou%252F_r-d1a5a004d-4550799-62ba2ffd4-f0b1do%25254m9fssbironoucgro.muit%26s%3DJL6edNz3R2QatzSYv91yzSG8gX4&data=05%7C02%7Cm.saunders%40nls.uk%7C3da1a889d39a425760f208de6f08eece%7C8a1892e4eb0046898cb8a4e6209d32a0%7C0%7C0%7C639070282060927952%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=siV0Djkz0OUzeFuV4A6r29XNKnRnCjFKPmFAwTPGdH0%3D&reserved=0.

The National Library of Scotland is a registered Scottish Charity, No: SC011086

This communication is intended for the addressee(s) only. If you are not the addressee please inform the sender and delete the email from your system. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of National Library of Scotland. This message is subject to the Freedom of Information (Scotland) Act 2002 and data protection legislation. Personal data sent to the Library by email will be processed in accordance with the Library’s privacy information available at www.nls.uk/privacy. No liability is accepted for any harm that may be caused to your systems or data by this message.

If this communication relates to a request for information from the Library under the Freedom of Information (Scotland) Act 2002 (FOISA) and you are dissatisfied with our response, you may ask the Library to conduct a review of our decision(s) regarding the supply of information. To begin a review please contact us in writing or other recorded form and describe the original request, explain your dissatisfaction, and provide an address for correspondence. You have 40 working days from receipt of our response to your request to submit a request for review. We will respond within 20 working days of receipt of your request. If you are still dissatisfied after a review you may ask the Scottish Information Commissioner to intervene. You may launch an appeal with the Commissioner online at: www.itspublicknowledge.info/Appeal. For more information about FOISA please visit: www.itspublicknowledge.info.

 

Before you print please think about the ENVIRONMENT

Blake Graham-Henderson

unread,
Feb 18, 2026, 12:32:21 PMFeb 18
to Saunders, Mike, archivesspac...@lyrasislists.org
All,

I appreciate the suggestions. I played around with various settings in various places in NGINX. It ended up being 100% NGINX. The default timeout for the PDF generation (5 minutes) at the Archivesspace level was enough for it to finish. But NGINX didn't tolerate more than 60 seconds. I'll include a heavily edited version of my NGINX config in case it's useful for someone else crawling the logs:


http {

    keepalive_timeout  300s;
    proxy_send_timeout 300s;
    proxy_read_timeout 3000s;
    send_timeout 300s;
    client_header_timeout 300s;
    client_body_timeout 300s;
    proxy_connect_timeout 300s;

    server {
      listen 80;
      listen [::]:80;
      server_name <public_url>;

      location /oai {
        proxy_pass <redacted>;
      }

      location / {

        proxy_pass <redacted>;
        return 301 https://$server_name$request_uri;
      }

    }

    server {
      listen 80;
      listen [::]:80;
      server_name <staff_url>;


      location / {
        proxy_pass <redacted>;
        return 301 https://$server_name$request_uri;
      }
    }


    server {
      listen 443 ssl;
      http2 on;

      server_name <staff_url>;

      ssl_certificate /etc/nginx/ssl/nginx.crt;
      ssl_certificate_key /etc/nginx/ssl/server.key;

      include includes/ssl-params.conf;
      include includes/proxy.conf;

      location /oai {
        proxy_pass <redacted>;
      }

      location / {
        
        proxy_pass <redacted>;

        proxy_send_timeout 300s;
        proxy_read_timeout 300s;
        proxy_connect_timeout 300s;
        send_timeout 300s;

      }
    }

    server {

      listen 443 ssl;
      http2 on;

      server_name <staff_url>;

      ssl_certificate /etc/nginx/ssl/nginx.crt;
      ssl_certificate_key /etc/nginx/ssl/server.key;

      include includes/ssl-params.conf;
      include includes/proxy.conf;

      location / {

        proxy_pass <redacted>;

        proxy_send_timeout 300s;
        proxy_read_timeout 300s;
        proxy_connect_timeout 300s;
        send_timeout 300s;


      }
    }


}
-Blake-
Conducting Magic
Will consume any data format
MOBIUS

Reply all
Reply to author
Forward
0 new messages