Skip to content
Node.js and Python3 min read

Node.js app returns 503 Service Unavailable after deploy

503 Service Unavailable

Short answer

When a Node.js app returns `503 Service Unavailable` after you deploy it, the server is up but the app didn't answer: usually it crashes on start from a missing package or variable, it wasn't restarted after the upload, the startup file in Setup Node.js App doesn't match your file, or it hit the memory limit. Read the app's log first; the reason is written there.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. First: open the log
  2. The most likely causes, in order
  3. How to confirm it’s fixed
  4. Prevention
  5. On ArabyHost

You upload the app, open the site, and get a white page with 503 Service Unavailable or “Service Temporarily Unavailable”. The web server received the request and handed it to Phusion Passenger, but your Node.js app didn’t start or didn’t answer in time. The page never says why, so always start with the log.

First: open the log

In cPanel open Setup Node.js App and click the edit icon next to the app. If Passenger log file is empty, enter a path such as /home/USER/logs/myapp.log, save, click Restart, open the site once, and read the file in File Manager or over SSH:

tail -n 50 /home/USER/logs/myapp.log

The most likely causes, in order

1. The app crashes while starting

In the log: Error: Cannot find module, a TypeError or SyntaxError, or a message about an undefined variable.

Fix: click Run NPM Install to install packages (module not found), add missing values under Environment variables (env not loaded), then Restart. For more detail see Passenger app error.

2. The app wasn’t restarted after the upload, or it’s stopped

Check: the app’s status in Setup Node.js App and when you last changed its files.

Fix: click Start App or Restart, or over SSH:

mkdir -p /home/USER/myapp/tmp && touch /home/USER/myapp/tmp/restart.txt

3. The startup file or app root doesn’t match your files

Check: compare Application root and Application startup file with your real file names. AI tools often produce server.js, index.js or dist/index.js, while the default is app.js.

Fix: correct both fields and save. In a TypeScript project the startup file is the built output in dist/, not a .ts file. If the log shows ERR_REQUIRE_ESM because package.json has "type": "module", create a tiny startup file app.cjs containing one line, import('./server.js');, and set it as the startup file.

4. The app listens in a way Passenger doesn’t expect

What you see: it works locally and gives 503 or EADDRINUSE on the server.

Fix: call listen once, on the port Passenger passes in, and don’t start a second server on another port:

const port = process.env.PORT || 3000;
app.listen(port);

5. Memory limit or slow startup

Check: open Resource Usage in cPanel and look for memory faults at the time. An app that loads large data or calls external services before listen can also exceed the startup timeout.

Fix: start listening first and load the rest afterwards, and keep less in memory. A 508 means the account reached its resource limit.

How to confirm it’s fixed

The log shows the startup line your app prints, such as Listening on ..., and the site loads without a 503 on refresh. Also try an internal route such as /api/health if you have one.

Prevention

  • Set the log path on day one.
  • Run the app locally with NODE_ENV=production node server.js before uploading.
  • Restart after every upload, or add touch tmp/restart.txt to your deploy steps.

On ArabyHost

On ArabyHost AI/Developer plans, Node.js 20 and 24 apps run through Setup Node.js App (the CloudLinux selector with Phusion Passenger) behind LiteSpeed, with SSH jailed in CageFS. Araby AI in the panel reads the app’s log and explains what caused the 503 and how to fix it. The Node.js deploy guide walks through the setup, and AI/Developer hosting lists what the plans include.

FAQ

The app runs with node app.js over SSH but not on the site. Why?

Because running it in a terminal isn't what serves the site. The site goes through Passenger, which starts the startup file configured in Setup Node.js App with that page's variables. Stop the manual copy, match the startup file and variables, then click Restart.

How long should I wait after clicking Restart?

The app starts on the first request after a restart, so that request may take a few seconds. If the 503 is still there after a minute, the app is crashing during start, and the log says why.

What's the difference between 503 and 508 here?

503 means the app didn't run or didn't answer; 508 Resource Limit Is Reached means the account hit its resource or concurrent process limit. A 503 can also appear when the app is killed for memory, so check Resource Usage in both cases.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.