NetTalk Central

Author Topic: Server shutdown without errors  (Read 4156 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Server shutdown without errors
« on: January 23, 2017, 02:22:00 AM »
Hi

I am still battling with my old problem in a previous threat and still cannot sort it out.

I run my webserver on one of my clients servers as an exe program. The clients connect to the server with their web browser. It is a memory form to register a claim. Every time when the client opens the form, it first connect to the server to validate certain input fields and when the validation criteria is true, there is a  'Go' button and opens a new memory form with all the required fields for the claim.

At the end there is a  checkbox to confirm that all the information is correct. On the confirmation I run source code to validate all required fields. If validation true at end then run p_web.script(.........("clicksave")

Then it do Validate All  where I register all the required fields, generate pdf report, upload the attachment files and send email with pdf and attachments.

This is working well, then suddenly the server shutdown without any gpf or error/message log.

Sometimes it run for days if lucky, otherwise shut down several times a day, maybe 5 claims registered. I cannot get any feedback from clients whit what they are busy on the form or when it happens.

Can somebody give any suggestions of any solution or what it could be causing this shutdown.

Unfortunately I cannot create a test example as their is a lot of dll and using MSSQL database.

Currently I use 'RestartOnCrash' to restart the webserver, but I need to resolve the problem urgently.

Clarion 8
Nettalk 9.17
All latest Capesoft templates.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Server shutdown without errors
« Reply #1 on: January 24, 2017, 10:43:38 PM »
Hi Johan,

Several approaches you can, and should, take to debugging this.

a) turn on logging to disk. This allows you to see the requests in the log, and determine what was happening right before the crash.

b) monitor machine resources, especially perhaps memory used by the program.

c) Add a p_web.trace call at specific places so you can narrow down the general area of the problem For example, if you are generating a report then I'd definitly add a TRACE call at the start and end of that to determine if the crash is in there. Be sure to include the THREAD() number though, and read the og carefully, because you might have multiple reports being generated at the same time. (so Start, Start before End, End etc..)

d) Connection problems between your server and the SqlServer can manifest by the exe terminating. So if you have any custom SQL code, especially prop:sql code, then put trace statements around that.

Trace Statements go to Debugview.

Cheers
Bruce


johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Server shutdown without errors
« Reply #2 on: January 26, 2017, 12:34:45 AM »
Hi Bruce

Tanks for the feedback. I work through the web server log files.

What I found that it is somewhere on the memory form that the server shut down. But it is not on the same field. It is randomly on another field.

On the debugview where I add p_web.trace, it is going fine on the 'Validate All' source code. It is somewhere on the memory form the problem that I can trace it down.

In the log-file I also found certain random IP  with User-Agent as:
User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
or
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)

In the Webserver procedure NetTalk extension, the 'Support Mobile browsers' is not tick on.

What will the affect of the iPhone and bingbot User-Agent have on the server. Could that shutdown the server if it is not Mobile compatible?

When this iPhone or bingbot user agent connect, the server sometimes runs for 10 minutes and then shutdown. In some cases it is the last entry in the log file when it shutdown.

Any suggestions will be appreciated.

Kind regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Server shutdown without errors
« Reply #3 on: January 26, 2017, 10:40:46 PM »
Hi Johan,

>> What I found that it is somewhere on the memory form that the server shut down.

ok. From the debugview log, what even, what stage and so on?

>> On the debugview where I add p_web.trace, it is going fine on the 'Validate All' source code. It is somewhere on the memory form the problem that I can trace it down.

remember that forms are really "event handlers" so you want o understand which event is happening when the crash occurs.

>> In the log-file I also found certain random IP  with User-Agent as:
>> User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)

completely normal and completely harmless.

>> What will the affect of the iPhone and bingbot User-Agent have on the server.

no effect at all.

>>  Could that shutdown the server if it is not Mobile compatible?

Absolutely not.

>> In some cases it is the last entry in the log file when it shutdown.

that might imply the shut-down is caused by a procedure outside the web server. Are there _any_ other procedures running in this program? any background processes?

Does the page the search bot was requesting do any access to the SQL database?

Does the crash happen after long periods of inactivity?

what are your BusyHandling and MARS settings to the SQL server set to?

cheers
Bruce