Problem in launching process from a windows service!

N

Nick

hi, all
Recently, our server which is a windows service got a problem.
This windows service will launch a process to process user's data each
time when a user connection comes in. The problems, once our service
lanunches about 50 process, it starts to get errors say got an
unexception or the process exe failed to initialized properly. I am
wondering, if there is some limitation about how many processes can be
launched from a window service.
So, I wrote a test projects to test this, and you guys can download it
from http://buglist.dotnet31.hostbasket.com/SyncServerTest.rar
There is readme.txt file in the root folder to explain what each
project does.
Any help would be appricated!

Thanks.
 
M

Michael C

Nick said:
hi, all
Recently, our server which is a windows service got a problem.
This windows service will launch a process to process user's data each
time when a user connection comes in. The problems, once our service
lanunches about 50 process, it starts to get errors say got an
unexception or the process exe failed to initialized properly. I am
wondering, if there is some limitation about how many processes can be
launched from a window service.
So, I wrote a test projects to test this, and you guys can download it
from http://buglist.dotnet31.hostbasket.com/SyncServerTest.rar
There is readme.txt file in the root folder to explain what each
project does.
Any help would be appricated!

Can't you do it without launching a process, ie in a dll instead?

Michael
 
N

Nick

Yes, we could.
But we also need to process user's data manually. If we put it in a
dll, we will not be able to do it manually.
 
N

Nicholas Paldino [.NET/C# MVP]

That doesn't make sense. If you contain the code in the DLL, you still
indicate when it runs, because you have to make an explict call to execute
any code in the dll.

It is most likely a permissions issue, because of the user associated
with the service.

You are better off trying to encapsulate the code in another DLL and
then making calls from your service.

Hope this helps.
 
N

Nick

Thanks you all.
What I was saying is, for example we have a exe named pushpull.exe. It
will get users' data file and push the data into database and then pull
new data from database to create users' data files. We have a windows
service to launch this exe, and when we launch it, the service will
provide some parameters to tell the pushpull where is the users' data.
Sometimes, we need to run pushpull.exe manually, to push users' data
into database. This is why we have the pushpull as an exe instead of a
dll.
I will start to encapsulate the code into an dll.
But I am still thinking, why the launch process failed. I do believe
there is some limitation in windows 2000 or .net framework.
Thanks.
 
M

Michael C

Nick said:
Thanks you all.
What I was saying is, for example we have a exe named pushpull.exe. It
will get users' data file and push the data into database and then pull
new data from database to create users' data files. We have a windows
service to launch this exe, and when we launch it, the service will
provide some parameters to tell the pushpull where is the users' data.
Sometimes, we need to run pushpull.exe manually, to push users' data
into database. This is why we have the pushpull as an exe instead of a
dll.

Just make a simple exe wrapper for the dll when you need to run it manually.
I will start to encapsulate the code into an dll.
But I am still thinking, why the launch process failed. I do believe
there is some limitation in windows 2000 or .net framework.

Looks like it, although 50 instances doesn't seem to be too high.

Michael
 

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