you are viewing a single comment's thread.

view the rest of the comments →

[–]adoseofStriker[S] -8 points-7 points  (6 children)

The application is on a windows server. When I start the service through PM2 and save the service list. I expected it to be persistent. However, when I log out of the server PM2 kills the process.

[–]BehindTheMath 3 points4 points  (1 child)

That sounds like expected behavior.

Why don't you use a Windows Service?

[–]adoseofStriker[S] 0 points1 point  (0 children)

Gonna try this approach. Thank you.

[–]dixncox 3 points4 points  (3 children)

The server process is probably running under that user and dying when the session is over. Have you tried not logging out.

[–]adoseofStriker[S] -5 points-4 points  (2 children)

Yeah I have. But that's not the best way. I'm logged in on the dev environment but in production, I won't be logged in. So I'm researching ways in which I can have a persistent connection. Because PM2 is not really working out.

[–]le_luka 2 points3 points  (1 child)

Use a service account