Site name: velvety-vacherin-4193fb
Netlify URL: https://deploy-preview-225--velvety-vacherin-4193fb.netlify.app/
All netlify function endpoints for my PR deploy are reaching the 10s timeout without running any of the endpoint code. I’ve identified the offending commit (https://github.com/amelioro/ameliorate/pull/225/commits/986363c23e8b327d9cbf51201ba0b409e04de385: before the commit, all endpoints work fine, after the commit, they reach timeout), but I’m having trouble identifying the issue. I added a console.log to the start of one Nextjs endpoint (/api/panel) and the netlify timeout is being hit without logging my console.log.
Link to example endpoint that hits timeout: tRPC.panel()
Code for example endpoint that hits timeout, here console.log is not being reached: https://github.com/amelioro/ameliorate/pull/225/commits/073cc6c8603cf2e6e40fc4e13efb96d79d6da3a5
Timeout log (Netlify internal ID: 01HAABYK4KWMRFG89WQPJ5VKWW
) (this is it - there’s no typical “INFO [GET] /api/…” logged):
Sep 14, 12:31:08 PM: 84a8da82 2023-09-14T17:31:19.511Z 84a8da82-f281-4635-b34a-fb7d6f7b488a Task timed out after 10.03 seconds
Sep 14, 12:31:18 PM: 84a8da82 Duration: 10034.46 ms Memory Usage: 296 MB Init Duration: 451.51 ms
Important notes:
- I’ve read the functions official docs, support guide [Support Guide] Netlify Lambda Functions 101 & Debugging, and tried browsing a few forums posts
- Functions build & deploy without issues (deploy log: Netlify App)
- Same timeout happens for other api endpoints (e.g. /api/auth/login, /api/trpc/[…])
- The endpoints with PR’s code work locally (via
next dev
), AND I’ve confirmed that endpoints withnetlify dev
ALSO work locally
I’m going to continue trying to investigate why my commit is causing the problem, but it’s entirely guess-and-check for me (add code, check if problem exists, remove code, check if problem exists), and I’ve spent several hours getting this far. Is there any way to have more details logged from before the request handler runs to help debug? I’m not sure how to more efficiently debug, since I’ve already tried adding a console.log to the beginning of the request handler, and that isn’t getting reached.