Hi guys. Since today, deployments of my next-js app keep running into timeouts and I can’t really tell why. A few minutes a go a preview build for one of my PRs went through fine. I then rebuilt the artifacts for that exact same commit and I run into a timeout. For some reason, I do see that the deployment tries to start the service twice and then after that retry the deployment runs into the timeout after a while. I don’t see any other errors or warnings in the logs, though!
The deploy code for that particular deployment is dep-cjlms8ocfp5c739i9bj0
Out of curiosity I tried to deploy the same branch on a different platform and it worked fine, which makes me believe that my codebase is less likely to be the reason for this behaviour.
EDIT: Here’s another curiosity: I have now set the next js port to 10000 manually. However, I always get that line “Detected service running on port .” Why is that?
Yes, that is correct. As I mentioned in your internal ticket, setting the
PORT environment variable to
10000 (or any valid port value) prevents our port detection process from scanning for open ports to determine which port your service is listening on. The issue is that NextJS is opening ports that cannot be connected to, we detect those ports, but when we try to connect to your service on that port, it fails. This results in a few issues for us, like deployments timing out and health checks falling, putting your service into an unhealthy state.
Render Support, UTC+10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.