client closing connection
cyberfights
HOBBYOP

16 days ago

"2025-11-30T19:24:23.020816744Z"

"POST"

499

"HTTP/1.1"

"HTTP/1.1"

"client has closed the request before the server could send a response"

"europe-west4-drams3a"

"[{"deploymentInstanceID":"duration":4788,"error":"client has closed the request before the server could send a response"}]"

any build other than the nixpack results in this error, the nix is deprecated is there a fix?

Solved$10 Bounty

13 Replies

Railway
BOT

16 days ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


bytekeim
PRO

16 days ago

hey, can you paste the exact start command that shows up in the deploy logs when it successfully deploys with Nixpacks?


bytekeim

hey, can you paste the exact start command that shows up in the deploy logs when it successfully deploys with Nixpacks?

cyberfights
HOBBYOP

16 days ago

Starting Container

> wrestling-roleplay-bot@1.0.0 start

> node wrestling.js

Wrestling bot API running on port 8080

npm warn config production Use --omit=dev instead.


bytekeim
PRO

16 days ago

your app hardcodes port 8080; that's why it only works on nixpacks (legacy port detection) and 499s on Railpack/Dockerfile

open wrestling.js and change the .listen line to:

const port = process.env.PORT || 8080;

app.listen(port, "0.0.0.0", () => { console.logWrestling bot api running on port ${port}); });

push and redeploy , lmk if it works


bytekeim

your app hardcodes port 8080; that's why it only works on nixpacks (legacy port detection) and 499s on Railpack/Dockerfileopen wrestling.js and change the .listen line to:const port = process.env.PORT || 8080;app.listen(port, "0.0.0.0", () => { console.logWrestling bot api running on port ${port}); });push and redeploy , lmk if it works

cyberfights
HOBBYOP

16 days ago

const PORT = process.env.PORT || 8000;

app.listen(PORT, () => console.logWrestling bot API running on port ${PORT}));

is what it is right now


bytekeim

your app hardcodes port 8080; that's why it only works on nixpacks (legacy port detection) and 499s on Railpack/Dockerfileopen wrestling.js and change the .listen line to:const port = process.env.PORT || 8080;app.listen(port, "0.0.0.0", () => { console.logWrestling bot api running on port ${port}); });push and redeploy , lmk if it works

cyberfights
HOBBYOP

16 days ago

changed to this, same error on railway deployment build


bytekeim
PRO

16 days ago

fix it like this exact copy-paste:

const port = process.env.PORT || 8080;

app.listen(port, "0.0.0.0", () => {
  console.log(`Wrestling bot API running on port ${port}`);
});

let me knew the result


bytekeim

fix it like this exact copy-paste:const port = process.env.PORT || 8080; app.listen(port, "0.0.0.0", () => { console.log(`Wrestling bot API running on port ${port}`); });let me knew the result

cyberfights
HOBBYOP

16 days ago

tysvm!!! its not erroring now on post thank u!!!


bytekeim

fix it like this exact copy-paste:const port = process.env.PORT || 8080; app.listen(port, "0.0.0.0", () => { console.log(`Wrestling bot API running on port ${port}`); });let me knew the result

cyberfights
HOBBYOP

16 days ago

solution accepted


bytekeim
PRO

16 days ago

awesome! glad it’s working now, If you hit any other issues just lmk


bytekeim

awesome! glad it’s working now, If you hit any other issues just lmk

cyberfights
HOBBYOP

16 days ago

thank u will do


Status changed to Solved brody 16 days ago


bytekeim

awesome! glad it’s working now, If you hit any other issues just lmk

cyberfights
HOBBYOP

16 days ago

ok so its working but half the time its giving the error rest of the time working fine


Status changed to Awaiting Railway Response Railway 16 days ago


bytekeim
PRO

16 days ago

perfect, now i think the "half the time" 499 is 100% classic Hobby plan cold starts, pro plan removes sleeping completely if you prefer

good night @cyberfights


Status changed to Solved ray-chen 16 days ago


Loading...