RpcIpcMessagePortClosedError: Process 38 exited [SIGKILL].
Hi, I'm deploying a ReactJS app, the build succeeds, it gets containerized and on deployment I get this error:
------------------------------------------------
react-scripts start(node:27) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option. (Use
node --trace-deprecation ...
to show where the warning was created)
(node:27) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
/app/node_modules/react-scripts/scripts/start.js:19
throw err;
^
RpcIpcMessagePortClosedError: Process 38 exited [SIGKILL].
at /app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:19:23
at Generator.next (<anonymous>)
at /app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:8:71
at new Promise (<anonymous>)
at __awaiter (/app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:4:12)
at ChildProcess.handleExit (/app/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:18:42)
at ChildProcess.emit (node:events:513:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: null,
signal: 'SIGKILL'
---------------------------------
I've tried:
- checking all my dependencies and resetting them
- I was running node 18.5 and changed railway to 18.21 (highest it can go)
- changed my node to match to 18.21
- added webpack.config.js -> useTypeScriptIncrementalApi: false
- added --max_old_space_size=4096 as an ENV var, and to the start command
(also have legacy-peer-deps=true in .npmrc)
build=100s, publish=25s, deploy fails in 10s
all works fine on local and fails with this on railway. According to metrics, the most memory goes up to=450MB, and CPU is 20-25%, network in=35B, out=0B...
Does anyone have any idea?22 Replies
Project ID:
N/A
⚠️ experimental feature
N/A
react-scripts start
starts a development server and should never be used in production, you want to build your app then serve the built files with something like serve
thanks for the tip, but can you expand on how it applies to the issue I've shared in terms of getting the server up?
the development server uses more ram than you are allocated on the free plan
thus it gets killed
I see...
^
serve
will use approximately 70-100mb depending on loadaccording to the metrics it's now using 455MB (when crashing) -> isn't the allocation 4GB?
no free tier is 512mb
right, thanks for this...and how much would you say the dev server uses?
it uses 455mb like you just said
hahah well if I have 512, wouldn't that cover it? out of mem makes sense in terms of what I've seen out there for this error but just wondering...
455mb is dangerously close to 512mb so your app would get killed for a memory spike that might not even show up on the metrics
but you don't want to run the dev server on railway even if you had enough memory, can't stress that enough
what's the main concern with that? (asking as my main concern right now is speed)
it would be speed, you are spot on
and memory, it could grow exponentially since it was already 455mb without any connections
yeah...makes sense. Thanks a lot!
so look into getting your app built and then serving those static files with
serve
one last thing, how do I mark this as solved?
I can do that, dw
thank you!
no problem!