NetTalk Central

Author Topic: Server doesn't respond  (Read 18450 times)

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Server doesn't respond
« on: March 03, 2013, 10:48:27 AM »
Hi Guys,

Sometimes afte sitting for a while (usually overnight) the Webserver stops responding.  The program is running (this happens both when running as an exe and as a service),  but the browser won't connect.

Attached is a tps file with a log of traffic showing the gets and posts.  Has this happened to anyone else?

The stuff dated 3/03 11:23 is where no response to browser occurred.

The stuff dated 3/03 11:31 is after the program was stopped and restarted.

NETTALK 6.51 Clarion 6.3

[attachment deleted by admin]
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: Server doesn't respond
« Reply #1 on: March 04, 2013, 10:53:05 PM »
Hi Greg,

yeah I've seen this happen a couple times over the years and it's generally a pig to debug,

there are a couple of general ideas in terms of what is happening, but the specifics can vary a lot from app to app.

a) The WebServer procedure is event driven of course. So you mustn't "run" any procedure from this procedure. You can START new threads, but if you have any kind of background routines - like session clear-ups or backups, or file maintainence or whatever, they shouldn't "run" directly on the WebServer thread - rather START them onto their own thread.

b) Any kind of MESSAGE or STOP procedure of course breaks the server. If you're running as a service you can't see these (but they exist). I recommend MessageBox to make sure these can't happen (or use prop:messageHook and prop:StopHook to make sure they can't appear.)
Running the program in Exe mode for a bit to see if anything visual does appear is a good thing to do as well.

c) Keep an eye on Ram and CPU usage. It's possible something is accumulating over time and ultimately overloads the machine.

d) make sure there's no power-saving on the machine, or specifically the network card. Nothing like the machine shutting down the hard disk, or network card to create some fun.

cheers
Bruce

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #2 on: March 05, 2013, 08:15:15 AM »
Hi Bruce,

No background threads.  No messages.  I am using messagebox so they would have shown up in the log I sent.  When I looked at the task manager I didn't see any memory use jump out at me.
All power saving settings are never.

More info.
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   MySQLWeb.exe
  Application Version:   0.0.0.0
  Application Timestamp:   51325203
  Fault Module Name:   c60runx.dll
  Fault Module Version:   0.6.300.9054
  Fault Module Timestamp:   44ff2dea
  Exception Code:   c0000005
  Exception Offset:   0006e863
  OS Version:   6.1.7601.2.1.0.272.7
  Locale ID:   1033
  Additional Information 1:   cb3d
  Additional Information 2:   cb3df5922acec54bba6f355078e26882
  Additional Information 3:   6cc3
  Additional Information 4:   6cc32171d2e6387f3738fb1ed024b320

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: Server doesn't respond
« Reply #3 on: March 05, 2013, 10:40:29 PM »
if you're getting an actual GPF then perhaps make use of GPF Reporter, or even the Clarion 8 debug runtime DLL may give you more info.

cheers
Bruce

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #4 on: March 05, 2013, 10:49:58 PM »
Hi Bruce,

I am using GPF Reporter.  I got that message after starting the program with the /ISS switch.  Now GPF reporter doesn't restart the program because it tries to restart it with the /ISS switch and the program gets stuck with an operating system error.

Part of that error is the error mesage from my prior posting.
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: Server doesn't respond
« Reply #5 on: March 06, 2013, 12:54:21 AM »
The /ISS switch is just used (once) to install the program as a service.
So you don't need to run it with that switch again.
So remove the switch, and report back on the GPF Report.

cheers
Bruce

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #6 on: March 06, 2013, 09:11:37 AM »
HI Bruce,

If I understand correctly, you run program /iss once.  After that you just run program.

This is what I did and when the program attempts to restart it gives the error that the program is already running as a service after the message that I sent above is displayed by the OS.

I have (as a test) now run program /rs, and just program to see if GPF reporter restarts the program in these problem instances.  I know GPF reporter works outside of this problem instance because I have a button on my window that creates a GPF and the program restarts just fine.
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: Server doesn't respond
« Reply #7 on: March 06, 2013, 10:15:39 PM »
>> If I understand correctly, you run program /iss once. 

yes.

>> After that you just run program.

no it's already running.
/ISS stands for Install and Start Service
/IS would be Install Service

If you want to run the program as an Exe you first have to Stop the servcice (using the windows service manager services.msc)

>> This is what I did and when the program attempts to restart it gives the error that the program is already running as a service

as I predicted. <g>

>> I have (as a test) now run program /rs,

don't play with the /RS parameter. Removing services (which is not the same as stopping them) often requires a reboot.

>> and just program to see if GPF reporter restarts the program in these problem instances.

you want to be able to trigger the GPF "at some time" so tie it into some outside thing the program detects. like say a file with a very specific name. (only then remove the file before GPF'ing <g>)

running the program again can't trigger the test.

Or perhaps you're going down a road you don't need to go down. Running the program to crash the service will likely not work.

cheers
Bruce

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #8 on: March 08, 2013, 10:09:10 AM »
Hi Bruce,

In the services dialog I cannot find my program.  In TaskManager I cannot find my program. 

However when the error (whatever it is occurs) I get a message saying my program cannot restart because it is already running.

When I do restart my program manually it starts with no problem and I am able to access the website.  Until it sits overnight and then the whole thing starts again.

Having looked at the things you've identified before, is there anywhere else to poke at?
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: Server doesn't respond
« Reply #9 on: March 10, 2013, 10:45:53 PM »
does the app use SQL?
is the SQL Server on the same machine?

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #10 on: March 11, 2013, 08:08:56 AM »
Hi Bruce,

The app does use SQL.  But not MSSQL, MySQL.

The tests are not done on the same machine as the MySQL server.  One was connected over the internet.  The other colocated in the same GoDaddy server farm.
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11175
    • View Profile
Re: Server doesn't respond
« Reply #11 on: March 11, 2013, 10:16:40 PM »
Hi Greg,

it occurs to me that if the SQL is on another machine, then there may be a "connect" issue between the program and the data. ie Clarion programs typically don't like being "disconnected" from the DB, so maybe there's something going on around that?

One possible test (if you can) is to run the program as an Exe for a period of time and see if
a) that's more stable and
b) if there are any visual messages generated which might give you some clues.

I've started a thread for collected knowledge here;
http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=4317.0

When converting to C8 I found a possible hang - in ABC - which I've documented there as well. Not sure if it's the one you have, but maybe.

cheers
Bruce

PS - this thread is long, and this forum software doesn't like me and long threads, so if you find out any more please start a new thread...
« Last Edit: March 11, 2013, 10:31:15 PM by Bruce »

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #12 on: March 18, 2013, 08:51:36 AM »
Hi Bruce,

To make sure that there was no disconnect with the other server with the MySQL database on it I put a heartbeat in a timer on the WebServer window that just accessed the MySQL server every 5 minutes.

I wrote an message out to CSMessage when it happened so that I could see when it failed.

It doesn't fail.  Not until I try and access the login the next day.  Then the program issues a GPF and restarts but the restarted program does not respond to any messages. 

I have to manuall stop the program and restart it before the website responds to any messages.  Then I'm good until tomorrow.

Tonight I am running the server program with the /netall parameter and capturing the output in debug.  You'll get that tomorrow.
Gregory C. Bailey

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Server doesn't respond
« Reply #13 on: March 18, 2013, 04:12:22 PM »
It doesn't fail.  Not until I try and access the login the next day.  Then the program issues a GPF

> I would add trace statements to see where in your login routine it GPF's also paying attention to memory and cpu levels on your server and mysql server

and restarts but the restarted program does not respond to any messages.

> It could be the original program still has a hold on the port when the program restarts and hence the new instance can't listen on the port. In one of your previous post you identified Problem Event Name:   APPCRASH Application Name:   MySQLWeb.exe - do you think your login is crashing MySQL somehow. Not sure what you are performing on your heartbeat but maybe it needs to replicate the login sequence?

bruce2

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #14 on: March 18, 2013, 07:35:07 PM »
The most useful information on a GPF is provided by GPF Reporter. That tells you the line of code that GPF'd and the code leading up to that code. In my experience it's the most effective way to find a GPF.

Cheers
Bruce