Adrarc
Adrarc10mo ago

Buildship Puppeteer Timeout Issue

Hey there! I am using a loop to generate ~200 pdfs using a slightly modified template for the HTML to PDF node. This is using Buildship's internal puppeteer deployment if I am not misunderstanding (https://puppeteer.buildship.run/v1/pdf). My PDFs are about 160Kb each when done. My problem is that after about ~100 iterations of the loop, my PDFs now become 39 bytes in my Supabase storage. Opening one of them as .txt instead of as .pdf shows the message "Navigation timeout of 30000 ms exceeded". Sometimes, the failed PDFs have the message "upstream request timeout" instead. I tried many times to pinpoint the exact issue - this never happens when I generate about 30 PDFs. More than that, around 100, and any other PDFs generated in my loop are .txt with these error messages. Could anyone check this and let me know if there is a simple fix to my problem? Is this issue coming from Buildship's server deployment of puppeteer ?
2 Replies
Gaurav Chadha
Gaurav Chadha10mo ago
Hi @Adrarc , Thank you for also sharing this also sharing over email. The Error upstream request timeout exceeded could be occurring due to the PDF function taking too long and server timeouts. And, the error Navigation timeout of 30000 ms exceeded could be due to the URL in the parameter taking more than 30 seconds to load the webpage. We will add support for additional parameters including timeouts which should solve this issue. Will update you once this is added.cc @Deepanshu
Adrarc
Adrarc10mo ago
Hi @Gaurav Chadha , apologies for the double up. I had posted here before realising it might have been better through support email. Many thanks for working on this. For anyone else who might have a similar issue, I have set up a temporary fix by using a while loop for each PDF creation, re-executing the PDF creation if the the error messages are returned. This makes the process very slow, but now all of my PDFs are properly generated.