How to fix problems running a large amount of services with the Wrapper on Windows |
|||||||
When installing and starting services running with the Wrapper, you might hit a point at which it seems it won't be possible to start any further service anymore. Usual indications for this are:
Each Service is allocating a certain amount of memory from the internal desktop heap space used to store things such as API elements etc.. A detailed description of the internal desktop heap can be found on the external site. If the service is launched as non-interactive Service, on a 32-bit Windows XP the default heap space is 512KB. The Wrapper itself is allocating around 10-15 KB for each instance, being started. Each JVM will also allocate around 20 KB. However, this value can vary depending on the API elements the JVM is loading. If the heap space is exhausted when the service is attempted to start, above errors can be the consequence. The desktop heap can be diagnosed with the Desktop Heap Monitor tool provided by Microsoft. After installed and configured the output should look like this:
The non-interactive services, which run as System user, belong in this case to Service-0x0-3e7$\Default. Starting more non-interactive services (run as System User) will increase the heap usage accordingly. Running the service as interactive service will cause the WinSta0\Default heap space usage to increase. Running the Service under a certain user account will create a new WinStation\Desktop session for the process. Any Service which will be run as this user will actually receive a own session. There are 2 workarounds currently available:
A 64-bit Windows has a significantly larger desktop heap space and therefore it needs much more services being running at the same time to eventually reach the limit. |