Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js Web Service Installed with os-service hits Windows Service Timeout #52

Open
goodacres opened this issue Jan 31, 2020 · 1 comment

Comments

@goodacres
Copy link

Hi,

I am currently trying to migrate a Node HTTP web service into a Windows native service and came across os-service as a possible means to do this. I have found all the documentation very useful so firstly, thanks a lot for the work that has gone into this tool, it is very useful.

I created a service creation script which adds a Windows service and provides the necessary args for programPath, programArgs etc.. The service now exists & I can start it and am able to temporarily reach my web service.

The issue I am having however is that as the web service runs as a continual process and does not (should not) technically finish executing, the Windows service is viewing the hangup as a failure to start, and subsequently times out after 30000ms (30s).

I haven't been able to find any arguments or settings for Windows service that would allow me to remove the timeout and hence have the service continually running/available. I don't think that would necessarily be correct however as from a SCM point of view, in theory the process would be permanently in a "starting" state.

I was just wondering if I am trying to use os-service outside of it's intended purposes here. Looking into it it seems as though something like Forever (https://www.npmjs.com/package/forever) may be what I am actually after.

Thanks in advance!

@si458
Copy link

si458 commented Jul 25, 2021

ive been having this issue with a few other node modules that handle windows service, inc this module
when you set the service to automatic and then restart from time to time it never starts for some reason?
the only way around it i have found is to set the service as a delayed automatic startup which will start after every other service has started + 2mins i believe (in my case it was about 5mins after the computer restarted)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants