Exited with status 137 while running your code. Its keep repeating it

Hi,

I have my NextJs application running on render. but suddenly it started with exits and restart issue

Server unhealthy
Exited with status 137 while running your code. Check your service logs for more information.
January 8, 2024 at 1:23 PM
Server healthy
January 8, 2024 at 1:18 PM
Server unhealthy
Exited with status 137 while running your code. Check your service logs for more information.
January 8, 2024 at 1:15 PM
Server healthy
January 8, 2024 at 1:03 PM
Server unhealthy
dial tcp 10.214.169.72:35757: connect: connection refused while running your code.
January 8, 2024 at 1:03 PM

in logs, its just showing all the paths that i am hitting as 502 error and restart logs

Using Node version 20.10.0 (default)

Jan 8 01:20:33 PM==> Docs on specifying a Node version: Setting Your Node.js Version | Render Docs

Jan 8 01:20:35 PM==> Running ‘npm run start’

Jan 8 01:20:36 PM

Jan 8 01:20:36 PM> app@0.1.0 start

Jan 8 01:20:36 PM> next start

Jan 8 01:20:36 PM

Jan 8 01:20:37 PM- ready started server on [::]:10000, url: http://localhost:10000

Jan 8 01:20:38 PM- info Loaded env from /opt/render/project/src/.env

Jan 8 01:20:39 PM- info Loaded env from /opt/render/project/src/.env

I tried searching a lot about it but didn’t find any solutions.

Thanks

Hi,

There may be a couple of things going on here.

We sometimes see issues with NextJs creating multiple ports, which can cause issues with our port detector. That issue would be implied by the 35757 port in this line you shared:

dial tcp 10.214.169.72:35757: connect: connection refused while running your code.

Please could you try setting a PORT env var on the service to disable the port detector (10000 is our usual recommendation, but you can chose another if you prefer).

The other events, with exit status 13 usually relates to out-of-memory issues.

Alan

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