I have a nestjs application, which was running for a long time on render and it was working fine. Today, I merged 1 PR and according to the pipeline, it gots deployed using master latest commit. Now, When I checked the deployment logs so it says build is successful, server started successfully, but somehow it started throwing some errors right after the successful start of the application. Here are the logs of my last deployment
133 packages are looking for funding
Sep 20 09:51:18 PM run `npm fund` for details
Sep 20 09:51:18 PM
Sep 20 09:51:18 PM18 vulnerabilities (5 moderate, 10 high, 3 critical)
Sep 20 09:51:18 PM
Sep 20 09:51:18 PMTo address issues that do not require attention, run:
Sep 20 09:51:18 PM npm audit fix
Sep 20 09:51:18 PM
Sep 20 09:51:18 PMTo address all issues (including breaking changes), run:
Sep 20 09:51:18 PM npm audit fix --force
Sep 20 09:51:18 PM
Sep 20 09:51:18 PMRun `npm audit` for details.
Sep 20 09:51:18 PM
Sep 20 09:51:18 PM> nest-server@0.0.1 prebuild
Sep 20 09:51:18 PM> rimraf dist
Sep 20 09:51:18 PM
Sep 20 09:51:19 PM
Sep 20 09:51:19 PM> nest-server@0.0.1 build
Sep 20 09:51:19 PM> nest build
Sep 20 09:51:19 PM
Sep 20 09:51:23 PM==> Uploading build...
Sep 20 09:51:33 PM==> Build uploaded in 8s
Sep 20 09:51:33 PM==> Build successful 🎉
Sep 20 09:51:38 PM==> Deploying...
Sep 20 09:52:06 PM==> Using Node version 20.12.2 (default)
Sep 20 09:52:07 PM==> Docs on specifying a Node version: https://render.com/docs/node-version
Sep 20 09:52:07 PM==> Using Bun version 1.1.0 (default)
Sep 20 09:52:07 PM==> Docs on specifying a bun version: https://render.com/docs/bun-version
Sep 20 09:52:15 PM==> Running 'npm run start:prod'
Sep 20 09:52:17 PM
Sep 20 09:52:17 PM> nest-server@0.0.1 start:prod
Sep 20 09:52:17 PM> node dist/main
Sep 20 09:52:17 PM
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [NestFactory] Starting Nest application...
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [InstanceLoader] DashboardModule dependencies initialized +105ms
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [InstanceLoader] AppModule dependencies initialized +90ms
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
Sep 20 09:52:28 PM[Nest] 104 - 09/20/2024, 4:52:28 PM LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
Sep 20 09:52:29 PM[Nest] 104 - 09/20/2024, 4:52:29 PM LOG [InstanceLoader] JwtModule dependencies initialized +600ms
Sep 20 09:52:29 PM[Nest] 104 - 09/20/2024, 4:52:29 PM LOG [InstanceLoader] FileModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmCoreModule dependencies initialized +8157ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] TypeOrmModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] CustomerModule dependencies initialized +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] UserModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] OrderSourceModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] OrderModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] ReportModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] AuthModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [InstanceLoader] ProductModule dependencies initialized +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] AppController {/api/v1}: +244ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1, GET} route +3ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] ProductController {/api/v1/products}: +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/products/search, GET} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/products, GET} route +2ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/products/:id, GET} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/products, POST} route +89ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/products/:id, PUT} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/products/:id, DELETE} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] CustomerController {/api/v1/customers}: +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/customers/search, GET} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/customers, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/customers/:id, GET} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/customers, POST} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/customers/:id, PUT} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/customers/:id, DELETE} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] OrderController {/api/v1/orders}: +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/orders, GET} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/orders/:id, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/orders/:id/pdf, GET} route +94ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/orders, POST} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/orders/:id, PUT} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/orders/:id, DELETE} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] UserController {/api/v1/users}: +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/users, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/users/:id, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/users, POST} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] AuthController {/api/v1/auth}: +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/auth/login, POST} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] FileController {/api/v1/files}: +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/files/upload, POST} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] ReportController {/api/v1/reports}: +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/reports, POST} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/reports/dashboard/stats, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RoutesResolver] OrderSourceController {/api/v1/order-sources}: +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/order-sources, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/order-sources/:id, GET} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/order-sources, POST} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/order-sources/:id, PUT} route +1ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [RouterExplorer] Mapped {/api/v1/order-sources/:id, DELETE} route +0ms
Sep 20 09:52:37 PM[Nest] 104 - 09/20/2024, 4:52:37 PM LOG [NestApplication] Nest application successfully started +8ms
Sep 20 09:52:38 PM--Exception-- undefined
Sep 20 09:52:38 PMexception: NotFoundException: Cannot HEAD /
Sep 20 09:52:38 PM at callback (/opt/render/project/src/node_modules/@nestjs/core/router/routes-resolver.js:77:19)
Sep 20 09:52:38 PM at /opt/render/project/src/node_modules/@nestjs/core/router/router-proxy.js:9:23
Sep 20 09:52:38 PM at Layer.handle [as handle_request] (/opt/render/project/src/node_modules/express/lib/router/layer.js:95:5)
Sep 20 09:52:38 PM at trim_prefix (/opt/render/project/src/node_modules/express/lib/router/index.js:328:13)
Sep 20 09:52:38 PM at /opt/render/project/src/node_modules/express/lib/router/index.js:286:9
Sep 20 09:52:38 PM at Function.process_params (/opt/render/project/src/node_modules/express/lib/router/index.js:346:12)
Sep 20 09:52:38 PM at next (/opt/render/project/src/node_modules/express/lib/router/index.js:280:10)
Sep 20 09:52:38 PM at cors (/opt/render/project/src/node_modules/cors/lib/index.js:188:7)
Sep 20 09:52:38 PM at /opt/render/project/src/node_modules/cors/lib/index.js:224:17
Sep 20 09:52:38 PM at originCallback (/opt/render/project/src/node_modules/cors/lib/index.js:214:15) {
Sep 20 09:52:38 PM response: { statusCode: 404, message: 'Cannot HEAD /', error: 'Not Found' },
Sep 20 09:52:38 PM status: 404,
Sep 20 09:52:38 PM options: {}
Sep 20 09:52:38 PM}
Sep 20 09:52:38 PMrequest method: HEAD request url/ {"statusCode":404,"timestamp":"2024-09-20T16:52:38.532Z","path":"/","method":"HEAD","errorName":"NotFoundException","message":"Cannot HEAD /"}
Sep 20 09:52:39 PM==> Your service is live 🎉
Sep 20 09:52:40 PM--Exception-- undefined
Sep 20 09:52:40 PMexception: NotFoundException: Cannot GET /
Sep 20 09:52:40 PM at callback (/opt/render/project/src/node_modules/@nestjs/core/router/routes-resolver.js:77:19)
Sep 20 09:52:40 PM at /opt/render/project/src/node_modules/@nestjs/core/router/router-proxy.js:9:23
Sep 20 09:52:40 PM at Layer.handle [as handle_request] (/opt/render/project/src/node_modules/express/lib/router/layer.js:95:5)
Sep 20 09:52:40 PM at trim_prefix (/opt/render/project/src/node_modules/express/lib/router/index.js:328:13)
Sep 20 09:52:40 PM at /opt/render/project/src/node_modules/express/lib/router/index.js:286:9
Sep 20 09:52:40 PM at Function.process_params (/opt/render/project/src/node_modules/express/lib/router/index.js:346:12)
Sep 20 09:52:40 PM at next (/opt/render/project/src/node_modules/express/lib/router/index.js:280:10)
Sep 20 09:52:40 PM at cors (/opt/render/project/src/node_modules/cors/lib/index.js:188:7)
Sep 20 09:52:40 PM at /opt/render/project/src/node_modules/cors/lib/index.js:224:17
Sep 20 09:52:40 PM at originCallback (/opt/render/project/src/node_modules/cors/lib/index.js:214:15) {
Sep 20 09:52:40 PM response: { statusCode: 404, message: 'Cannot GET /', error: 'Not Found' },
Sep 20 09:52:40 PM status: 404,
Sep 20 09:52:40 PM options: {}
Sep 20 09:52:40 PM}
Sep 20 09:52:40 PMrequest method: GET request url/ {"statusCode":404,"timestamp":"2024-09-20T16:52:40.675Z","path":"/","method":"GET","errorName":"NotFoundException","message":"Cannot GET /"}
Now, server is also not reachable it seems like server is not running but in the logs it also shows the log that nest application successfully started.
Please note that, I didn’t change any settings of the application on render and this app was running for a long time and usually merges the PRs to master branch and they get deployed via pipeline normally. Facing this issue for the first time.