I am experiencing an issue with my Node.js application deployment on Render. The deployment logs indicate a “Port scan timeout reached, no open ports detected” error, and my application is not able to start successfully. Below are the details:
Deployment Environment:
Service Name: isc-be-dev
Environment: Production
Instance Type: Free
Node.js Version: v18.19.1
Problem Description:
When deploying my application, it says ‘==> Your service is live ’. But after that I consistently receive the following errors in the logs:
“No open ports detected, continuing to scan…”
“Port scan timeout reached, no open ports detected.”
After a series of these messages, the application crashes with the message “Killed - [nodemon] app crashed - waiting for file changes before starting…”
Application Details:
Here is a snippet of my server configuration:
import { cyan } from "colors";
import dotenv from "dotenv";
import { app } from "./app";
dotenv.config();
const port = process.env.PORT || 5000;
app.listen(port, () => {
console.log(
`Your server is up and running at: ${cyan(`http://localhost:${port}/`)}`,
);
});
I’m seeking assistance on how to resolve this port detection issue. Is there something I’m missing in my configuration? Any advice or troubleshooting steps would be greatly appreciated.
As a starting point, we don’t recommend using nodemon on Render. The platform is already monitoring your process.
“Killed” often implies an out-of-memory issue. Maybe try running ts-node with the --transpile-only option to try to reduce its memory footprint. Or transpile your TypeScript to JS in the build and run it with plain node.
While you mention the environment is production, there are many references to development tools and naming. Development tools/modes often use more memory than production mode, which may be the cause of the “Killed” message.