NetTalk Central

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

lanmicro

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

Here is the GPF report.

Program : H:\6\MySQL\MySQLWeb.exe
Version :
At : 12:53:18 on 2013/03/19
Workstation: : bailey64xp32
User Name: : Gregory Bailey
Reported error : EXCEPTION_ACCESS_VIOLATION - Error reading data at : 0000000Ch
Windows : Win XP  - 5.1.2600 Service Pack 3
Clarion : 6.3
Thread : 3    Field : 0    Event : 0    Keycode : 0
Error at address : 0070E715h  no debug info, Module=H:\6\MySQL\c60odbx.dll 6.300.9054
Stack Trace
??? 004DD808h    Line ?=147    no proc       Src=SelfService.Clw
??? 0040726Ch    Line=495       Proc=FUNCTIONCALLED_@_FILECALLBACKINTERFACE_@_FILEMANAGER@F21FILECALLBACKINTERFACEl6PARAMSRscRsc  Src=ABFILE.CLW
??? 010DE7A0h    Line ?=3023    no proc       Src=wsl.cpp    Module=H:\6\MySQL\c60runx.dll 6.300.9054
??? 004DD808h    Line ?=147    no proc       Src=SelfService.Clw
??? 004DD808h    Line ?=147    no proc       Src=SelfService.Clw
??? 00407FFDh    Line=943       Proc=TRYFETCH@F11FILEMANAGERBk  Src=ABFILE.CLW
??? 004DD808h    Line ?=147    no proc       Src=SelfService.Clw
[01] 00456F53h    Line=1361    Proc=R$VALIDATEUPDATE  Src=MySQL017.clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
??? 004D9484h    Line ?=147    no proc       Src=SelfService.Clw
??? 00457974h    Line=350       Proc=R$RESTOREMEM    Src=MySQL017.clw
[02] 0046060Ch    Line=199       Proc=LOGINFORM@F18NETWEBSERVERWORKERl  Src=MySQL017.clw
??? 004D3F70h    Line ?=147    no proc       Src=SelfService.Clw
[03] 0044F390h    Line=53       Proc=CALLFORM@F5P_WEBBfl  Src=MySQL013.clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
[04] 0048E165h    Line=7774    Proc=VALIDATEFORM@F18NETWEBSERVERWORKERBfBkl  Src=NetWeb.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
[05] 0048E957h    Line=7677    Proc=SAVEFORM@F18NETWEBSERVERWORKERBfBkl  Src=NetWeb.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
[06] 004AA602h    Line=2699    Proc=PROCESSLINK@F18NETWEBSERVERWORKEROsb  Src=NetWeb.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
[07] 0044F2FEh    Line=77       Proc=PROCESSLINK@F5P_WEBOsb  Src=MySQL013.clw
[08] 004A5CC0h    Line=5879    Proc=_HANDLEPOST@F18NETWEBSERVERWORKER  Src=NetWeb.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
??? 004E7D30h    Line ?=147    no proc       Src=SelfService.Clw
[09] 004AC3CAh    Line=2503    Proc=PROCESSREQUEST@F18NETWEBSERVERWORKERsb  Src=NetWeb.Clw
??? 004D7614h    Line ?=147    no proc       Src=SelfService.Clw
[10] 0044F50Ah    Line=41       Proc=WEBHANDLER@Fsb  Src=MySQL013.clw
[11] 01091AB1h    no line number    no proc       Module=H:\6\MySQL\c60runx.dll 6.300.9054
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Server doesn't respond
« Reply #16 on: March 19, 2013, 09:44:45 PM »
Hi Greg,

cool - thanks.

The key starting point in this report is the line prefixed with [1]. The numbers with actual line numbers, [1], [2] and so on are the "definites" - the others are "maybes". so I always start on the more recent definite and work forwards and backwards from there;

[01] 00456F53h    Line=1361    Proc=R$VALIDATEUPDATE  Src=MySQL017.clw

so first thing to do is look at this line of code - ie right click on the procedure in module 17 and choose "module" (_not_ source).
then go to line 1361. It'll likely be a call to do ValidateUpdate,or possibly it'll be in the ValidateUpdate routine.

That's useful because it tells us where and what the machine was doing when it died. You can start by looking at the code in that routine _especially_ any hand-code you may have added to that routine.

Note also this is the LoginForm procedure - so someone was trying to log in at the time - and it's just possible there was something funny going on. Not terribly likely, but possible. But I'd look first at the embed code in there and see what it says.

Incidentally note that it's likely doing a database interaction at that point - a TRYFETCH - which may bring us back to some sort of file access error. It may be worth collecting a few of these reports to see if they're always in the same place, or if the happen at different places, but always when accessing the database. That gives us quite a few clues.

I also see you're using C6 9054 - you might have more joy with the Clarion runtimes from a later build of C6, I know they did a lot of SQL stuff in the later builds, and that may help - hard to say for sure though.

Cheers
Bruce





lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #17 on: March 20, 2013, 03:56:32 PM »
Hi Bruce,

I added some code there to validate the entries in the logon process.

In an effort to prevent this GPF I have surrounded that code with code that opens and closes the file that is used for validation.

Let you know tomorrow if that is successful.
Gregory C. Bailey

lanmicro

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

Not successful.  Here is my Validate Routine in the LoginForm.  This line only GPFs if the program sits overnight.  I just let it sit from 5:45Am to 11:45 AM and there was no problem.  But last night I let it sit from 9:45PM to 5:45AM and GPF.

ValidateUpdate  Routine
  do CompleteForm
  do ValidateRecord

  if p_web.GetValue('loc:hash') = p_web.GetSessionValue('loc:hash')

    access:MyStores.Open()
    access:MyStores.UseFile()
    mysto:NbStore     = loc:Login
    if access:MyStores.TryFetch( mysto:K_NbStore )    !!!!!!!!!!!!This is the line that is GPFing.
      loc:invalid     = 'loc:Login'
      p_web.SetValue( 'retry', p_web.site.LoginPage )
      loc:Alert       = 'Login Failed.  Try Again.'
      p_web.DeleteCookie( 'loc__login' )
      p_web.DeleteCookie( 'loc__password' )
    else
      if upper( loc:password ) = upper( mysto:Password )
        p_web.ValidateLogin()
        p_web.SSV( 'loc:hash', 0 )
        p_web.SetSessionLevel( 1 )
        p_web.SSV( 'CurrentStore', mysto:NbStore )
        p_web.SSV( 'CurrentStoreSysId', mysto:SysId )
        p_web.SSV( 'CurrentStoreName', mysto:Name )
        p_web.SSV( 'DateLastUpdated', format( mysto:DtLastUpdated, @d02 ) )
        if loc:remember = 1
          p_web.SetCookie( 'loc__login', loc:login, today() + 30 )
          p_web.SetCookie( 'loc__password', loc:password, today() + 30 )
        else
          p_web.DeleteCookie('loc__login')
          p_web.DeleteCookie('loc__password')
        end!if
      else
        loc:invalid = 'Loc:Login'
        p_web.SetValue('retry',p_web.site.LoginPage)
        loc:Alert = 'Login Failed. Try Again.'
        p_web.DeleteCookie('loc__login')
        p_web.DeleteCookie('loc__password')
      end!if
    end!If
    access:MyStores.Close()
  Else
    p_web.DeleteCookie('loc__login')
    p_web.DeleteCookie('loc__password')
  End
  ! delete the session values, so if the user comes back to the form, the items are not set.
  p_web.deletesessionvalue('loc:login')
  p_web.deletesessionvalue('loc:password')
  p_web.deletesessionvalue('loc:remember')
  p_web.deletevalue('loc:login')
  p_web.deletevalue('loc:password')
  p_web.deletevalue('loc:remember')
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Server doesn't respond
« Reply #19 on: March 22, 2013, 06:56:01 AM »
Hi Greg,

that's a normal ABC file access line, and I'm assuming it's a MySQL table, so I'm not sure how much help I'll be. I'm not the SQL expert by any means, and I've never used MySql myself.

Perhaps other can step in and offer suggestions - but it seems like perhaps some sort of SQL error.

You might have some joy using the RTL DLL's from a later build of C6 - I know there were a lot of SQL updates in the builds after 9054.

Cheers
Bruce


kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Server doesn't respond
« Reply #20 on: March 24, 2013, 01:32:06 AM »
If the updating of clarion does not work, I would try a a couple of things...

Add the line that GPF's to your heartbeat test
try to rw-write that block of code as Prop:SQL

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #21 on: March 24, 2013, 07:27:52 AM »
Hi Greg,

In Clarion code using MySQL were it opens the file(s) always GPF'ed for me! I had to use the OMIT() around the the file open code and put it after OPEN(Window) was called. For whatever reason MySql needed a window handle when using odbc according to the techs at MySQL. All I know is that it worked.

BTW my code is almost identical to yours and I cannot get it to validate user name and password, using a tps file for mine. Go figure...mine was generated using the application wizard and does not work. All I done is put the file access code in.

Ashley

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #22 on: March 25, 2013, 10:10:46 AM »
Hi Kevin,

That code is in my heartbeat code with no problems.  The problem only occurs if the application has been up overnight with the first attempt at logging in in the morning.

I Think that I will place code in the program to automatically GPF at midnight (GPF Reporter will auto restart) and see it that resolves the problem.
Gregory C. Bailey

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #23 on: March 25, 2013, 10:15:25 AM »
Hi Ashley,

The code does work the first and subsequent times I try and access the website.  It only fails if the website has been idle overnight.  (which makes it really hard to test).
Gregory C. Bailey

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Server doesn't respond
« Reply #24 on: March 25, 2013, 10:49:50 PM »
Hi Gregory,

You mention your site being idle some time at night.
Is there a possibility that the mySql server times out in some sort of way?

Rene Simons
Rene Simons
NT14.14

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #25 on: March 27, 2013, 10:01:55 AM »
Hi Rene,

That was my first thought, but the heartbeat code accesses the MySQL database.

Since I am only able to run a single test per day I made 3 changes to my program. 
1.  Updated it to a later build of c6.
2.  Changed my access code to loop next (no ABC) through file to find the correct password (like the heartbeat code )
3.  After midnight cause the program to GPF and restart using GPF reporter.

In the morning the website works!  Don't know which of the above was the correct solution.

I also had to changed the server 2008 r2 to not display the dialog box "Windows is searching for a solution" so that the old instance of the program would just fail and the new instance would run with no interferance.
Gregory C. Bailey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Server doesn't respond
« Reply #26 on: March 27, 2013, 09:55:12 PM »
Hi Greg,

>> In the morning the website works!  Don't know which of the above was the correct solution.

I'm sure your client really wants you to make it unstable again, but it might be worth undoing the 3 changes, then trying them one at a time to see which one is helping. It'll be useful information to you, but also to everyone else I think.

The one I'd test first, and the one I think is the most likely is the Clarion 6 upgrade. If they can tolerate a few more nights of pain then narrowing that down for sure will be most interesting.

Cheers
Bruce


lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #27 on: March 28, 2013, 12:16:53 PM »
Hi Bruce,

I spoke too soon.  This morning was the first test without the stupid Micorsoft "Searching for a solution" dialog and the program just sat there.  Could not connect from my browser.  Causing a GPF by the code

poke( 0, x# )

caused the program to restart and start accepting messages from my browser.

So none of the things I tried was successful.

Clarion 9059
NetTalk6.51
Gregory C. Bailey

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Server doesn't respond
« Reply #28 on: April 01, 2013, 08:07:24 AM »
Some new information.

I am getting an error 08S01 when attempting to access the MySQL server through ODBC.

05D0H(3) 08:48:00.437 Allocating Statement 0EDEF08H on Connection 0EC7050H Time Taken:0.00 secs
05D0H(3) 08:48:00.437 OPEN(Stores:0691B6CH)  Time Taken:0.00 secs
05D0H(3) 08:48:00.437 GET_PROPERTY(Stores:0691B6CH)  Time Taken:0.00 secs
05D0H(3) 08:48:00.437 SETNULLS(Stores:0691B6CH) Error: Invalid Field Type Descriptor  Time Taken:0.00 secs
05D0H(3) 08:48:00.437 SETkeykey(Stores:0691B6CH,mysto_K_NbStore[2])  Time Taken:0.00 secs
05D0H(3) 08:48:00.437  MYSTO:NBSTORE: 720
05D0H(3) 08:48:00.437
05D0H(3) 08:48:00.437 Allocating Statement 0EDDB58H on Connection 0EC7050H Time Taken:0.00 secs
05D0H(3) 08:48:00.437 Setting Concurrency to Read Only for Statement 0EDDB58H Time Taken:0.00 secs
05D0H(3) 08:48:00.437 Setting Cursor Type to Forward Only for Statement 0EDDB58H Time Taken:0.00 secs
05D0H(3) 08:48:00.437 Resetting Parameters Statement 0EDDB58H Time Taken:0.00 secs
05D0H(3) 08:48:00.437 Preparing Statement 0EDDB58H : SELECT SYSID,NAME,NBSTORE,PASSWORD,DTLASTUPDATED FROM Stores WHERE (NBSTORE >= ? ) ORDER BY NBSTORE
05D0H(3) 08:48:00.453 Error Occurred: 08S01 [MySQL][ODBC 5.2(a) Driver][mysqld-5.1.61]MySQL server has gone away
05D0H(3) 08:48:00.453  Time Taken:0.01 secs
05D0H(3) 08:48:00.453 NEXT(Stores:0691B6CH) MySQL server has gone away Time Taken:0.01 secs  [font=Verdana]!>> This is strange not 2 seconds earlier the heartbeat code found it[/font]
05D0H(3) 08:48:00.453  MYSTO:SYSID  : 0
05D0H(3) 08:48:00.453  MYSTO:NAME   : ''
05D0H(3) 08:48:00.453  MYSTO:NBSTORE: 720
05D0H(3) 08:48:00.453  MYSTO:PASSWORD : ''
05D0H(3) 08:48:00.453  MYSTO:DTLASTUPDATED : Invalid date (0)


I have written code to explicitly reopen the file just before attempting to access the record, but that doesn't appear to solve the problem.  First access in the morning after midnight the program GPFs on an access to the file restarts, hangs and must be restarted manually.

Any suggestions?
Gregory C. Bailey

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Server doesn't respond
« Reply #29 on: April 02, 2013, 11:29:12 AM »
Greg,
I understand that this is not your own machine.

Does the client of yours run a BackUp or anything during the night?

Is that server publicly abailable, does it have a static IP-Address or a dynamic one? Thats a wild guess, but maybe the router disconnects during the night to prevent an automatic disconnect by the provider during the office hours. Mine does, albeit I have a static address.

Getting a new IP-Address during the night is less painful (well, in most cases) because at 3am you can expect that not many users are connected. If webserver and DB-server are permanently conncted over a LAN then this will likely have no influence.

just two thoughts....
Wolfgang