Problems running lots of services

R

Rich Bernstein

We are currently running 30+ custom and third party services on a machine in
addition to the system services (including SQL and IIS), the majority of
them are using SrvAny. OS is Win2k Advanced Server.

The services can be categorized as follows:

3 "real" services (not using srvany).
2 batch files run as services using srvany (the batches terminate but the
services remain in the "started" state)
1 srvany service, which then spawns an additional 17 processes.
31 srvany services, which are single processes

(The two batch programs simply start the other services in an organized
manner, with appropriate delays and tests to ensure network connections and
other dependencies are up.)

When we try to start aditional (srvany) services, the first 2 start (change
state to "started"), but the associated processes crash (srvany keeps
running). Any we attempt to start beyond the first 2 give the error "Could
not start the <name> service on Local Computer. Error 1053: The service did
not respond to the start or control request in a timely fashion".

Stopping one of the srvany-wrapped batch file services allows an additional
service to be started. The wrapped process itself either is successful or
fails depending on whether there are other srvany services with stopped
processes running.

Stopping any service (srvany or not) appears to allow an additional
srvany-wrapped service to start properly and remain functional.

Stopping the service that spawns 17 additional processes, and killing those
processes, allows several more services to start. Starting 6 of those
(srvany) services prevented 12 of the spawned processes from starting, when
the spawning service was restarted.

Is there some sort of limit to the number of processes that can be started
from the service system? It doesn't appear that the limit is directly due
to srvany, but obviously srvany could cut such a limit in half if one
exists. There appear to be 54 system services running, plus 89 processes
(including copies of srvany) running due to our custom services.

Any other ideas on what would cause this problem, or how to solve it?

Thanks.
 
J

Jason Hall [MSFT]

--------------------
From: "Rich Bernstein" <[email protected]>
Newsgroups: microsoft.public.win2000.general
Subject: Problems running lots of services
Date: Tue, 18 May 2004 14:53:51 -0400

We are currently running 30+ custom and third party services on a machine in
addition to the system services (including SQL and IIS), the majority of
them are using SrvAny. OS is Win2k Advanced Server.
........
Is there some sort of limit to the number of processes that can be started
from the service system? It doesn't appear that the limit is directly due
to srvany, but obviously srvany could cut such a limit in half if one
exists. There appear to be 54 system services running, plus 89 processes
(including copies of srvany) running due to our custom services.

Any other ideas on what would cause this problem, or how to solve it?

Thanks.
--------------------

Yes there is a limit in Windows 2000 as to how many services you can have
running. It has to do with a type of memory call "Desktop Heap"
There is a hard limit of 48MB, this is reduced to 20MB if you have Terminal
Services installed (so uninstall it if you don't need it)

There have been many changes to memory management/usage in Windows Server
2003, including how Desktop Heap is allocated. This change has been
back-ported and can be found in hotfix Q318942 (although it is not
documented as being so). Contact Microsoft Support to obtain this hotfix.

Q318942: The Desktop Heap Is Smaller with Terminal Services Turned On
support.microsoft.com/?id=318942

Q824422: Unexpected behavior occurs when you run many processes on a
computer
support.microsoft.com/?id=824422


--
~~ JASON HALL ~~
~ Performance Support Specialist,
~ Microsoft Enterprise Platforms Support
~ This posting is provided "AS IS" with no warranties, and confers no
rights.
~ Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
~ Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
R

Rich Bernstein

From: "Rich Bernstein said:
--------------------

Jason Hall said:
--------------------

Yes there is a limit in Windows 2000 as to how many services you can have
running. It has to do with a type of memory call "Desktop Heap"
There is a hard limit of 48MB, this is reduced to 20MB if you have Terminal
Services installed (so uninstall it if you don't need it)

There have been many changes to memory management/usage in Windows Server
2003, including how Desktop Heap is allocated. This change has been
back-ported and can be found in hotfix Q318942 (although it is not
documented as being so). Contact Microsoft Support to obtain this hotfix.

Q318942: The Desktop Heap Is Smaller with Terminal Services Turned On
support.microsoft.com/?id=318942

Q824422: Unexpected behavior occurs when you run many processes on a
computer
support.microsoft.com/?id=824422


--
~~ JASON HALL ~~
~ Performance Support Specialist,
~ Microsoft Enterprise Platforms Support
~ This posting is provided "AS IS" with no warranties, and confers no
rights.
~ Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
~ Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Thanks. It sounds like hotfix Q318942 might do the trick, however, the KB
article seems to have disappeared.

We do need terminal services, and it sounds dangerous to me to reduce the
non-interactive desktop heap size.
 
S

shatapos

Hello,


I was wondering if 48mb is the heap sum limit in Windows 2003 Server
(Enterprise/Datacenter) as well.


If so is it changable?


I'm hoping for your asistance as this problem is causing me premature
hairloss.


Thanks!


Eyal Weinreb
Israel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top