Topic on Talk:Parsoid

Issue With starting on boot with CentOS 6

11
Summary by Arlolra

Not enough free memory.

Stationeers.Wiki (talkcontribs)

hi, i have parsoid all working and installed with CentOS, everything works fine, except i can't figure out how to re-launch the service on boot, i have tried mp2 however it seems to keep stoping and restarting the service and despite it says its running on mp2 process list it doesn't connect.

at the moment I'm launching it in an other screen in shell and letting it run, but this isn't probably the best way to achieve this.

Arlolra (talkcontribs)

If it's starting and stopping in a loop, it probably means it's crashing. What do you see in the logs? Maybe the port it's trying to bind to is already in use?

Stationeers.Wiki (talkcontribs)

when i run "node --max-old-space-size=128 bin/server.js -n 1"

it works fine, but without --max-old-space-size=128 it crashes

Arlolra (talkcontribs)

Is that true in your screen also? How much ram is available on your server?

Stationeers.Wiki (talkcontribs)

2GB , but for the last 5 hours with the command "node --max-old-space-size=128 bin/server.js -n 1" it works perfect

Arlolra (talkcontribs)

2GB free? That command starts two processes (master/worker), each with a 2GB memory limit (I believe) but they shouldn't be using that at startup.

Stationeers.Wiki (talkcontribs)

this is the output without using --max-old-space-size=128

{"name":"parsoid","hostname":"s104-238-92-14.secureserver.net","pid":13231,"level":60,"err":{"message":"Cannot read property 'pid' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'pid' of undefined\n    at Worker.startupWorkerExit (/root/parsoid/node_modules/service-runner/lib/master.js:184:57)\n    at Worker.emit (events.js:180:13)\n    at ChildProcess.worker.process.once (internal/cluster/master.js:190:12)\n    at Object.onceWrapper (events.js:272:13)\n    at ChildProcess.emit (events.js:180:13)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)","levelPath":"fatal/service-runner/unhandled"},"msg":"Cannot read property 'pid' of undefined","time":"2018-03-15T00:31:05.078Z","v":0}

Arlolra (talkcontribs)
Stationeers.Wiki (talkcontribs)

thanks!

will this require a software update?

Arlolra (talkcontribs)

Yes, but that won't fix your problem, only help in diagnosing. But if you're getting success by limiting how big the heap can grow, I'm guessing there just isn't even enough free memory to start the worker.

Stationeers.Wiki (talkcontribs)

ah right, ok, thank you! will close this topic now!