server icon indicating copy to clipboard operation
server copied to clipboard

nodejs server kills itself

Open argenx-pmason opened this issue 3 years ago • 3 comments

When using the extension I find that every so often, usually if I havent run something for a while, the server has stopped running and I have to restart it. There doesnt seem to be any reason. No message or warning. Please fix.

argenx-pmason avatar Nov 17 '22 07:11 argenx-pmason

Hi Phil - are you able to attempt persistence using the pm2 npm tool?

https://github.com/sasjs/server#persisting-the-session

There is nothing in the server itself that forces a stoppage, rather it is a system issue. Hence the need for a 'wrapper' facility to keep the session alive.

allanbowe avatar Nov 17 '22 09:11 allanbowe

Thanks - I will try that.

argenx-pmason avatar Nov 22 '22 07:11 argenx-pmason

For me, using pm2 on windows solved the problem of the server being stopped and not restarted. Now it restarts automatically, so there is always a server ready to process my programs.

However pm2 does not prevent the server stopping while waiting for a long running program to complete. In such a case the submitted program seems to terminate prematurely, and the log file retrieved only contains:

read ECONNRESET

jbodart-argenx avatar Dec 01 '22 08:12 jbodart-argenx