vshost

W

warth33

Hello

Newbie in asp net here. I have been struggling with a problem for
weeks, and after analyzing logs I found something new. The problem in
short:

I have a web app, not done in .net. It is apache/php stuff. A few php
pages make call to stand alone apps developed in c#. The c# apps makes
operations on the windows media services, doing stuff like creating/
removing publishing points.

Everything works well. But sometimes, maybe after 1 day, or 2 days, or
a week, it happens that the php script that calls the c# app hangs
upp. The script seems to run the c# app infinitely, without getting
the return value from the app.

The truth is that if I run the c# app from command line, it always
works, even after the php-problem has showed up. But, after the
problem has showed up, from php I cannot make call to any otther c# at
all. Even a simple hello world c# app will not work. The only
sollkution then is to restart the apache server. Then everything will
work again until next time the php-call to c# app will hang up again.

No one could help me in the php/apache groups, no one knows what this
is about. So I have put log everywhere, both in the php scripts, and
in the c# apps.

The c# apps called from php, always execute without problems, and they
never go in a catch statement. And they also log that they return
something to the caller. I really dont understand where the problem
is.

The new thing I have discovered is the following:

When the php stopped working (but remember that the only thing that
doesnt work is the call to any exe-file, all the other pages work
wiothout problems), I had a look at the task manager. Well, I saw that
among the running processes there was one that had the same name as
the exe file that was the last to be executed from php. BUT, the name
of the file is somthing like:

appname.vshost.exe

What have I done? As I am a newbie, When I created my c# apps in the
developement place (like C:\projects\mycapp) and tested that they
worked, then I went to the folder C:\projects\mycapp\mycapp\bin
\Release and copied all the files that were created in that directory.
Then moved all these files into my webserver root. Soin the server
root, I had these files, for the mycapp-project:

mycapp.exe
mycapp.vshost.exe
mycapp.vshost.pdb

Why? Well, I dont know. Probably because I am a newbie in visual
studio, and just thought it was a good idea to move all the generated
files.

Thats it. My question is: what are vshost.exe files? Does anyone know
why, when the php hangs up, I can see an vshost.exe file in the task
manager? Why is it still running? Should I remove all these files, and
only have app.exe for every project, in the webserver? Thank you.
 
W

warth33

Well, it didnt help. I removed all the vshost's and pdb's. But it
still happens that the calling php script hangs up when executing a c#
app.

The problem is that the c# app that eventually will make php to hang
up executes without problems. I can see it in the log files. At the
end of the try statement, the c# app returns a value. This is done
with Console.Writeline();

However, when php hangs up, it seems like (checking in the log) that
php waits forever for getting back the return value (the
cnosole.writeline).

After the php has hanghed up, if I try to run an app through the
command line, it executes without problems, and even prints the
console.writeline in the command windows. But if I call a dummy c#
app, like cnosole.writeline("hello world"); then it will wait for
ever, and never return the string.
 
W

warth33

As I said before, the problem was not vshost. I have recompiled all
the apps, and only deployed, for every app, the exe file and the
required dll's.

It is very frustating. I have put log everywhere, but no traces are
showed there. The apps never go in the catch statement. The apps
always work from command line. But for some reason the exec call from
php hangs upp at some point.

No one in the php/apache group understands why this happens, and
cannot give me some good explanation. No one here that thinks to know
why all this is happening?
 

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

Similar Threads


Top