Jump to content

event logs


Recommended Posts

Guest ajaxers@gmail.com
Posted

Hello

 

I have a windows server 2003 basic edition. On this server I installed

an apache web server, and I run a web application. The language

scripting used is php.

 

The web application is based on a few pages that call executable

applications written in c#. This c# applications make operations on

the windows media services, and doing stuff like create/remove

publishing points (for those who know what this mean).

 

The web pages, a few of them, are written in a way that they MUST get

the response from the c# application, regarding the success or failure

of the operation they had to make.

 

To call an executable exe file from the php language script, you use a

php function called exec.

 

All this works. But, it work continuosly for a few hours, or a few

days. Not more than this. Suddenly it happens a strange thing. A call

from php, with exec, seems to go in an infinite loop. The php exec

waits for ever, and never gets back the result from the c#

application.

 

With the help of logs, I saw that actually the c# application that

never returns back to php, is actually executed without problem. The

application never goes in the catch statement. Moreover, the c# apps

are ALWAYS able to run from the command line, even after the exec

problem has showed up.

 

Anyway, as soon as the exec problem has showed up, I cannot call any

c# app from php anymore. After the problem shows up, I cannot either

call a dummy c# app that prints hello world from php. The only way to

solve the problem than is to restart the apache server.

 

Sorry for this long decsription. Anyway: no traces about the problem

is found in the apache or php logs. Not at all.

 

I wanted to investigate if the problem can be found in windows. I

opened eventvwr. I didnt find anything there. I checked in the menu

Applications and Security, but there is nothing there.

 

Is there somewhere else where I can find traces about this problem you

think?

  • Replies 10
  • Created
  • Last Reply
Guest Dave Patrick
Posted

Re: event logs

 

I'd be inclined to ask in a php programming group.

 

--

 

Regards,

 

Dave Patrick ....Please no email replies - reply in newsgroup.

Microsoft Certified Professional

Microsoft MVP [Windows]

http://www.microsoft.com/protect

 

<ajaxers@gmail.com> wrote:

> Hello

>

> I have a windows server 2003 basic edition. On this server I installed

> an apache web server, and I run a web application. The language

> scripting used is php.

>

> The web application is based on a few pages that call executable

> applications written in c#. This c# applications make operations on

> the windows media services, and doing stuff like create/remove

> publishing points (for those who know what this mean).

>

> The web pages, a few of them, are written in a way that they MUST get

> the response from the c# application, regarding the success or failure

> of the operation they had to make.

>

> To call an executable exe file from the php language script, you use a

> php function called exec.

>

> All this works. But, it work continuosly for a few hours, or a few

> days. Not more than this. Suddenly it happens a strange thing. A call

> from php, with exec, seems to go in an infinite loop. The php exec

> waits for ever, and never gets back the result from the c#

> application.

>

> With the help of logs, I saw that actually the c# application that

> never returns back to php, is actually executed without problem. The

> application never goes in the catch statement. Moreover, the c# apps

> are ALWAYS able to run from the command line, even after the exec

> problem has showed up.

>

> Anyway, as soon as the exec problem has showed up, I cannot call any

> c# app from php anymore. After the problem shows up, I cannot either

> call a dummy c# app that prints hello world from php. The only way to

> solve the problem than is to restart the apache server.

>

> Sorry for this long decsription. Anyway: no traces about the problem

> is found in the apache or php logs. Not at all.

>

> I wanted to investigate if the problem can be found in windows. I

> opened eventvwr. I didnt find anything there. I checked in the menu

> Applications and Security, but there is nothing there.

>

> Is there somewhere else where I can find traces about this problem you

> think?

>

>

>

Guest ajaxers@gmail.com
Posted

Re: event logs

 

On 20 Jan, 16:54, "Dave Patrick" <DSPatr...@nospam.gmail.com> wrote:

> I'd be inclined to ask in a php programming group.

>

 

Well, of course I have asked it there. And even in a c# group. But

without any luck. The only ones were a few on the php-groups that

think I should investigate in the windows event log. So thats why I

came here..

Guest Newell White
Posted

Re: event logs

 

 

 

"ajaxers@gmail.com" wrote:

> On 20 Jan, 16:54, "Dave Patrick" <DSPatr...@nospam.gmail.com> wrote:

> > I'd be inclined to ask in a php programming group.

> >

>

> Well, of course I have asked it there. And even in a c# group. But

> without any luck. The only ones were a few on the php-groups that

> think I should investigate in the windows event log. So thats why I

> came here..

>

 

When things work for a while but then fail on a windows system, look for

some kind of resource bottleneck - memory leak, not releasing file handles,

etc.

You may not find this in event log, but you should notice it in Task Monitor.

--

Regards,

Newell White

Guest ajaxers@gmail.com
Posted

Re: event logs

 

On 21 Jan, 10:28, Newell White <NewellWh...@discussions.microsoft.com>

wrote:

> "ajax...@gmail.com" wrote:

> > On 20 Jan, 16:54, "Dave Patrick" <DSPatr...@nospam.gmail.com> wrote:

> > > I'd be inclined to ask in a php programming group.

>

> > Well, of course I have asked it there. And even in a c# group. But

> > without any luck. The only ones were a few on the php-groups that

> > think I should investigate in the windows event log. So thats why I

> > came here..

>

> When things work for a while but then fail on a windows system, look for

> some kind of resource bottleneck - memory leak, not releasing file handles,

> etc.

> You may not find this in event log, but you should notice it in Task Monitor.

> --

> Regards,

> Newell White

 

You mean in the task manager? Something like: Start -> Windows

Security -> Task manager? And than check for processes? But these

things show real time processes. If a problem happens when Im not

logged in, I will not be able to see what happened, right?

Guest Newell White
Posted

Re: event logs

 

 

 

"ajaxers@gmail.com" wrote:

> On 21 Jan, 10:28, Newell White <NewellWh...@discussions.microsoft.com>

> wrote:

> > "ajax...@gmail.com" wrote:

> > > On 20 Jan, 16:54, "Dave Patrick" <DSPatr...@nospam.gmail.com> wrote:

> > > > I'd be inclined to ask in a php programming group.

> >

> > > Well, of course I have asked it there. And even in a c# group. But

> > > without any luck. The only ones were a few on the php-groups that

> > > think I should investigate in the windows event log. So thats why I

> > > came here..

> >

> > When things work for a while but then fail on a windows system, look for

> > some kind of resource bottleneck - memory leak, not releasing file handles,

> > etc.

> > You may not find this in event log, but you should notice it in Task Monitor.

> > --

> > Regards,

> > Newell White

>

> You mean in the task manager? Something like: Start -> Windows

> Security -> Task manager? And than check for processes? But these

> things show real time processes. If a problem happens when Im not

> logged in, I will not be able to see what happened, right?

>

Yes of course I meant Task Manager - brain not adjusted to Monday yet!

 

Ctrl+Alt+Del is how I get there.

Under View.. Select Columns.. make sure you are looking at CPU time, Memory,

Virtual Memory, and Handle count.

If you check at hourly intervals you will notice any process that is using

more resources each visit.

Not terribly sophisticated but has worked for me a few times.

--

Regards,

Newell White

Guest ajaxers@gmail.com
Posted

Re: event logs

 

I become a little bit suspicious when I had a look at the task

manager. The web server has run a couple of days without hanging up,

yet. It will hang up soon, maybe in the next few hours, it always

happens.

When I check the task manager now, I see a few things that maybe

someone here think are bad, I hope:

 

httpd.exe

Mem usage: 58 123 K

VM size: 67 676 K

Handles: 829

 

mysqld-nt.exe (This one maybe is abnormal?)

CPU time: 45:23:08

Mem usage: 56 680 K

VM Size: 562 604 K

Handles: 4 428

Guest ajaxers@gmail.com
Posted

Re: event logs

 

Another thing is about when the exec function hangs up. The thing is

that it never happened that I was inlogged when the exec hangs up (at

least, this is what I think). I can imagine that when the call to exec

fails, if I was inlogged on the server, then I could see some error

message. Or do you think that this would habe been logged in the event

logs? Cause I use to access the server a couple of times a day, for a

short time. I do it through remote desktop connection.

 

Is there maybe a way to get informed when something goes wrong, like

for memory leak? Like sending a mail to root in unix?

Guest ajaxers@gmail.com
Posted

Re: event logs

 

> httpd.exe

> Mem usage: 58 123 K

> VM size: 67 676 K

> Handles: 829

>

> mysqld-nt.exe (This one maybe is abnormal?)

> CPU time: 45:23:08

> Mem usage: 56 680 K

> VM Size: 562 604 K

> Handles: 4 428

 

Well, experimenting by self, I restarted apache server. After restart

I saw the following:

 

httpd.exe

Mem usage: 16 968 K

VM size: 16 696 K

Handles: 705

 

This means that after a couple of days that server has run without

beeing stopped, the values of mem usage and vm size increases a lot.

IS this somthing wrong?

Guest ajaxers@gmail.com
Posted

Re: event logs

 

Ok, an interesting thing. The exec hanged up now. But I was not

inlogged. This time I opened task manager and selected "Show process

from all user" (should have done this before).

 

Now I can see what is going on. It was not difficult to guess, but at

least I have seen that now. Everytime, after the exec begins to give

problems, the exec is called, then I can see in the task manager that

there is one of the processes called by exec running. So If I open the

browser and go to: test.php, that in turn will do exec (hello.exe), a

new process is added in the task manager, so right now I have a lot of

hello.exe running...

Guest Newell White
Posted

Re: event logs

 

 

"ajaxers@gmail.com" wrote:

> Ok, an interesting thing. The exec hanged up now. But I was not

> inlogged. This time I opened task manager and selected "Show process

> from all user" (should have done this before).

>

> Now I can see what is going on. It was not difficult to guess, but at

> least I have seen that now. Everytime, after the exec begins to give

> problems, the exec is called, then I can see in the task manager that

> there is one of the processes called by exec running. So If I open the

> browser and go to: test.php, that in turn will do exec (hello.exe), a

> new process is added in the task manager, so right now I have a lot of

> hello.exe running...

>

Sorry, should have suggested all users.

 

Sounds like you are swamping real (RAM) memory with all those hello.exe

processes.

This is causing problems for RAM-intensive processes.

 

You mention httpd.exe and mysqld-nt.exe - these look bad to me.

 

A healthy process in a healthy system has more real memory than virtual

memory.

It has some virtual memory because occasionally infrequently used pages are

swapped out to meet transient demand for RAM.

When it has more virtual memory than real memory, implication is that it can

never get as much RAM as it would like, and is swapping pages furiously - you

can select a column to show swap rate.

In particular mysqld-nt.exe wants 560Mbyte of RAM.

Is this normal, or is it leaking memory?

How much RAM does your server have?

 

If a process is leaking memory, until this can be fixed a work-around is to

restart the process regularly - if this is possible.

--

Regards,

Newell White


×
×
  • Create New...