I am experiencing a weird issue, it has to do with the number of applications I can run under a specific user account.
My application is network based and when it receives a command, it will spawn a specific program to be launched, this program can be launched many times on the same server as its isolated from others. When I run this application under one user account, my application stops spawning new processes when there is about 100 of these applications started.
If I start another version of my listener under another user account, I can as well get to about 100 instances of the spawned applications starting.
I do not believe this is a server limitation as when I log in as another user, I am able to spawn more applications. Does anyone know what the limitation is here, and if it can be raised safely? I have also tried to run my listener as a service, but it seems the maximum number of applications I can get running while doing that is far less than running under user accounts. As a service I seem to only get about 10 instances of my application to be launched. (my application is not specially developed to be run as a service though)
Windows Server 2008R2
Listener application is written in C++
I am not sure how this "network based" application works exactly but it sounds a bit like Remote App or App-V from Microsoft. You basically run a remote app on a server in a sandbox and it appears to be running locally on the client.
For this scenarios Microsoft has WSRM. With Windows System Resource Manager you can manage server processor and memory usage with standard or custom resource policies.
You can use Windows System Resource Manager to:
- Manage system resources (processor and memory) with preconfigured policies, or create custom policies that allocate resources per process, per user, per Remote Desktop Services session, or per Internet Information Services (IIS) application pool.
- Use calendar rules to apply different policies at different times without manual intervention or reconfiguration.
- Automatically select resource policies that are based on server properties and events (such as cluster events or conditions) or changes to installed physical memory or number of processors.
- Collect resource usage data locally or in a custom SQL database. Resource usage data from multiple servers can be consolidated on a single computer running Windows System Resource Manager.
- Create a computer group to help organize Remote Desktop Session Host (RD Session Host) servers that you want to manage. Policies can easily be exported or modified for an entire computer group.
More about WSRM here:
Now if you are interested in limiting the number of instances a user can run check out these links:
Limiting Simultaneous Users of an Application: http://support.microsoft.com/kb/80863
How to limit 32-bit applications to one instance in Visual C++: http://support.microsoft.com/kb/243953
I hope this helps.
- Marked as answer by Zhang QikunMicrosoft contingent staff, Moderator Wednesday, January 02, 2013 7:19 AM