sasjs / server

Build Apps on Base SAS

Home Page:https://server.sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nodejs server kills itself

argenx-pmason opened this issue · 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.

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.

Thanks - I will try that.

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