How to view POST request params/query to external URL in Vercel logs? Need to debug a 504 15s timeout

During the vercel build process, or even if we access a non-cached page and have it built at that point, we often get a 504 : GATEWAY_TIMEOUT error on the page and in the logs. It states:

Vercel Runtime Timeout Error: Task timed out after 15 seconds

These requests include POST requests to our Strapi CMS hosted elsewhere. Its those POST requests that have a high time. Like a couple of requests for one page both adding up to about 11 seconds, then what with other processing at Vercel its taken it over 15s and Vercel gives a timeout.

BUT our CMS is not slow… if we accessed it direct in our browser and run GraphQL requests its fine, its FAST.

My localhost is fetching the data OK. Its just in Vercel, its a really slow POST request.

So is there any way I can view what the POST (graphql) request is for these Vercel timeouts so I can then try to debug that in the GraphQL interface, see if its the POST request and/or response that is large maybe. There does not seem to be any means to view this in Vercel logs, so I have no idea what the request is that is taking so long.

Thank you

Hi @laurencecope. I found your support ticket and it looks like you already worked with our engineers to identify the problem. Thanks for working with our team to find a solution. I’d like to share it here in case it helps anyone else.

The combination of prefetching and a high number of links was bombarding the CMS and slowing it down. The quick solution in this case was to disable prefetch on links.

Thanks again for working with our team to identify the problem, and for sharing the solution that worked for you!

Thanks Amy! Sorry I forgot to update it here.

Since disabling pre-fetch on all links I am now not getting the time out issue, so I do indeed think it was my CMS overloaded with POST requests and slowing it down!

Thanks

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.