4

Can anyone provide any information on running mongos as a reliable service on a Windows Server 2008R2 (64-bit) Web server? 10Gen suggests using the Windows Server 2003 Resource Kit Tools, but they are outdated and mongos is still not directly supported to run as a service on Windows.

Robert
  • 41
  • 1

1 Answers1

4

You can use the SRVANY program from the Windows Resource Kit to run mongos as a service, as is described in the MongoDB documentation. SRVANY will work fine on all currently-shipping versions of Windows, regardless of how old SRVANY might be.

You might want to look into the the Non-Sucking Service Manager (NSSM) as an alternative to SRVANY. It's freely redistributable, does the same things as SRVANY, and has a lot more configuration options and has much better recovery functionality.

Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
  • Great info, thank you. We noticed when using SRVANY that when the mongos service crashes, the service continues to run and appears healthy, it just stops responding on its TCP Port. – Robert Oct 26 '11 at 21:44
  • @Robert: NSSM can help you with that. SRVANY is "dumb" when it comes to monitoring the child process it spawns, but NSSM can re-spawn the child process. Have a look-- you'll be pleased. – Evan Anderson Oct 27 '11 at 00:49