Skip to content
Service does not stay active
kurohyou
OP

10 months ago

I've been trying to get my service fully deployed. However it keeps stopping the container a few seconds after starting and connecting to the database.

Service Logs:

Starting Container

Listening on http://0.0.0.0:8080

Connected to MongoDB

Stopping Container

npm error path /app

npm error command failed

npm error A complete log of this run can be found in: /root/.npm/_logs/2026-01-27T22_29_07_060Z-debug-0.log

npm error signal SIGTERM

npm error command sh -c node .output/server/index.mjs

$10 Bounty

6 Replies

Anonymous

10 months ago

can i get /root/.npm/_logs/2026-01-27T22_29_07_060Z-debug-0.log??

need more info and possibly the index.mjs to see why its failing

have you tried a local instance to see if its Railway?

based off this the platform killed the service


Does this happen locally?


can i get /root/.npm/\_logs/2026-01-27T22\_29\_07\_060Z-debug-0.log?? need more info and possibly the index.mjs to see why its failing have you tried a local instance to see if its Railway? based off this the platform killed the service

kurohyou
OP

10 months ago

It does not happen locally.

I'm not sure how to access /root/.npm/_logs/2026-01-27T22_29_07_060Z-debug-0.log in railway?


kurohyou
OP

10 months ago

--verbose doesn't give me any other information, and from what I can tell there's no way to access the debug log files from within railway?


kurohyou
OP

10 months ago

Here's the index.mjs that nuxt is generating though:

import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import { Server as Server$1 } from 'node:http';
import { Server } from 'node:https';
import { t as toNodeListener, d as destr, u as useRuntimeConfig, a as trapUnhandledNodeErrors, s as setupGracefulShutdown, b as useNitroApp } from './chunks/_/nitro.mjs';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'mongoose';
import 'argon2';
import 'crypto';
import 'node:url';

const cert = process.env.NITRO_SSL_CERT;
const key = process.env.NITRO_SSL_KEY;
const nitroApp = useNitroApp();
const server = cert && key ? new Server({ key, cert }, toNodeListener(nitroApp.h3App)) : new Server$1(toNodeListener(nitroApp.h3App));
const port = destr(process.env.NITRO_PORT || process.env.PORT) || 3e3;
const host = process.env.NITRO_HOST || process.env.HOST;
const path = process.env.NITRO_UNIX_SOCKET;
const listener = server.listen(path ? { path } : { port, host }, (err) => {
  if (err) {
    console.error(err);
    process.exit(1);
  }
  const protocol = cert && key ? "https" : "http";
  const addressInfo = listener.address();
  if (typeof addressInfo === "string") {
    console.log(`Listening on unix socket ${addressInfo}`);
    return;
  }
  const baseURL = (useRuntimeConfig().app.baseURL || "").replace(/\/$/, "");
  const url = `${protocol}://${addressInfo.family === "IPv6" ? `[${addressInfo.address}]` : addressInfo.address}:${addressInfo.port}${baseURL}`;
  console.log(`Listening on ${url}`);
});
trapUnhandledNodeErrors();
setupGracefulShutdown(listener, nitroApp);
const nodeServer = {};

export { nodeServer as default };
//# sourceMappingURL=index.mjs.map

The container has shut down, which means that the ephemeral storage is wiped. I don’t think you’re able to get the logs…


Welcome!

Sign in to your Railway account to join the conversation.

Loading...