node.jsiis-7.5iisnode

IISnode - making the node process always working


I'm running a nodeJS REST api on windows server using IIS7.5 with iisnode.

I note that the node process is not always active in background so sometimes response takes more time due to loading since it needs to create all connections and other stuff to get data for responses.

I run my application under default application pool.
I set the settings(applicationHost.config) of the startMode="AlwaysRunning" and followed the guide here: http://www.schwammysays.net/auto-starting-websites-on-iis-7-5/

I know that if I choose not to work with IISNode I can do it with forever, but we really need it to work with IISNode and we would like the process to be run as like it's running with forver.

Do you guys have any suggestions? did you have have a similar problem before?

Thanks in advance,
Max.


Solution

  • It's a little bit funny but I found the next solution good enough for me:

    1) Open IIS(intemgr).
    2) Go to Application Pools.
    3) Right click on the pool which runs your nodeJS app.
    4) Choose Advanced Settings.
    5) Set "Idle Time-Out" under the Process Model section to "0".

    After you browse to your app for the first time it will never shut down due to being idle.