NetTalk Central

Author Topic: Error and crash  (Read 10101 times)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Error and crash
« Reply #15 on: November 27, 2018, 10:14:12 PM »
Hi Osa,

>> I see in the performance tab 20 connections and 187 threads but it is not correct since there is no one connected, what could be happening?

First thing I'd be interested in knowing is how you know "no-one is connected".
But that aside, if you have 187 threads then it's likely your system is leaking threads.

In other words one, or possibly more, requests being made to your system end up in a thread "not being finished".

If you look at the log tab you can see the thread number of the most recent request. The "last time" a thread is used is the call that calls it to stall.

So for example if the most recent one was on thread 188, then look back in the log to see the last one for 186, 185, 184 and so on. See if you can spot a specific call (maybe a report) which is common.

Then in your testing try and re-create that call - and see if the thread completes, or if it hangs.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #16 on: November 28, 2018, 04:20:08 AM »
hi bruce, How can i save the log to the disk? the settings in log screen & disk don't work any NT example have this working?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Error and crash
« Reply #17 on: November 28, 2018, 11:06:20 PM »
In app window designer,
right click on the radio buttons and choose Action.
You need to fill in the template settings there.

You will likely use a table in your dictionary - I believe one of the early examples (1, 2 or 3) have this set up.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #18 on: November 29, 2018, 05:15:07 AM »
after add log settings and compile

 No matching prototype available - C:\Apps\Fecipur\FECIPUR002.clw:1351,20

in declarations generate by NT

AddLog                 PROCEDURE(FILE p_File,*String p_Field,*String p_Name,String p_DataString,<String p_ip>),DERIVED
AddLog                 PROCEDURE(String p_Data,<string p_ip>),DERIVED

NT 10.36

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #19 on: November 29, 2018, 05:28:22 AM »
ignore, i found the problem in web Basicwithmenu have a log table but in DOS driver and my original table is in .tps

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #20 on: December 11, 2018, 12:32:11 PM »
hello bruce, I have the log file when the system is hanging but I can not identify which thread or procedure produced the problem, is it possible with this file to identify the problem, that file is an xml that can be loaded into a table?

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #21 on: December 12, 2018, 11:53:51 AM »
I have another client log with the same problem, the threads begin to auto increment until the system does not accept more requests..

Somebody can help me to find what procedure cause the problem?

Thanks..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Error and crash
« Reply #22 on: December 12, 2018, 11:26:11 PM »
I'd say the problem starts on line 40991;

<item>12/11/18,14:12:09,12.205.102.26</item>
<request>GET /SatasGallery?PinNumber=062-090-830-21-063 HTTP/1.1
...
<log>
<item>12/11/18,14:12:09</item>
<thread>5</thread></log>
<log>

You can see that that <log> never closes, suggesting that the request did not complete. The next item is
<item>12/11/18,14:16:43</item>
<thread>6</thread></log>

which is a couple minutes later, but uses thread 6 - indicating that thread 5 is "locked".

So the first place I'd look is the SatasGallery procedure and determine why it's failing.
(perhaps it lost a connection to the database or something?)

cheers
Bruce


osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #23 on: December 13, 2018, 04:14:46 AM »
Thank you very much, Bruce, i had my suspicion with this procedure, but I could not understand in the log where the problem started, that procedure is connected to a database of images to generate a gallery, but I have seen that database is not optimized and I have no control over it. , but I will give my suggestions ..

The question is how can control? or How did you find that in the log? Do you have any tools for that? it's like looking for a needle in a haystack
« Last Edit: December 13, 2018, 06:56:02 AM by osquiabro »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Error and crash
« Reply #24 on: December 13, 2018, 11:36:33 PM »
>> How did you find that in the log?

I opened it in notepad and looked for the last instance of thread 6.
By that point it was leaking threads so I looked up a bit from there to see where the leak started, and it seemed to be the SatasGallery one.
It's all in plain text, so easy to read, and then there's a big time gap between that request, and the one after it, and the thread number increments, it indicates that the thread 5 might have become never-ending.

>> The question is how can control?

Well, you need to look at your code to make sure that it "succeeds" or "fails" and doesn't just go into limbo.
I guess whatever you do depends a lot on your code there.


cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #25 on: December 14, 2018, 10:23:22 AM »
i saw in log that the field is too short for save a transaction, this is a part of log example not complete..
  end of log"</reques<log>" or never complete the log.

<log>
<item>12/12/18,18:43:38,24.50.233.230</item>
<request>GET /SatasGallery?PinNumber=088-052-308-09-000 HTTP/1.1
Host: www.crimpr.net:88
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,es-419;q=0.8,es;q=0.7
Cookie: .ASPXANONYMOUS=6qX_LgrXDGVIwYUgPx-Z5PIXUtJSndjvoMHEQBsW1TMzelkU2tAO4u6WeRow9cVOUwW7RQqWS9eAk2Frl4_0uUKvZJtUp-nrzRj4_wnZZjXoZ6ov0; __utmz=186353659.1544576375.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); dnn_IsMobile=False; language=es-ES; __RequestVerificationToken_L2NyaW1kbm41=_fJrKhNerDtaQYxMwTbWhUvyWyMAk_Gm_3z-Ej4TnTjMBoS0KI2T3fHZceT7e5_EgU8XpQ2; __utma=186353659.2060740771.1544576375.1544576375.1544654385.2; __utmc=186353659; __utmt=1; ASP.NET_SessionId=ltevdexrtnjw0j3f<log>
<item>12/12/18,18:43:38</item>
<thread>5</thread></log>
<log>
<item>12/12/18,18:43:40,24.54.207.195</item>
<request>GET /reports/$$$YaHgdfqfijuSHItI.jpg HTTP/1.1
Host: www.crimpr.net:88
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: image/webp,image/apng,image/*,*/*;q=0.8
Referer: http://www.crimpr.net:88/SatasGallery?PinNumber=023-008-373-71-000
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: __utmz=186353659.1536070029.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); .ASPXANONYMOUS=JBURCZK6EZiE4ot95TnOQRRPFj4gevqu8DZX8E5XiF1rDeNKsbVysvswmfXYddbSha-v9np1pYtDsd3PnxaqMcMVsxjgV-FCiRpYK_fl96lowDW80; dnn_IsMobile=False; language=en-US; __RequestVerificationToken_L2NyaW1kbm41=kmllnvgy-nMgCM5Snc0Z41FpRKDZn1E1bMFR-oht0P_L37XslEKs8QgWJ_4TPcRNUgAIHA2; ASP.NET_SessionId=wuph2de22yl5cn0ra1aokqyc; __utma=186353659.2033773045.1536070029.1544462358.1544651899.20; __utmc=186353659; SESSIONIDX=eomNrxdhn8BAlFP01t5qRaHv3VXYna

</reques<log>

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Error and crash
« Reply #26 on: December 19, 2018, 01:46:00 AM »
I guess that's a function of the size of the field in your DOS table.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #27 on: December 19, 2018, 04:27:20 AM »
It's not my file  ;D ;D ;D, just copy it from one of your examples ..

is possible to save this log into tps or any other database format?

i think that found and corrected the leak in my both projects, in one project the problem is a client driver version of SQL Server and a function that return a message error that NT don't controler, and in other project for a moment is a  Sata Gallery that you found in a log

thanks very much..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11155
    • View Profile
Re: Error and crash
« Reply #28 on: December 20, 2018, 12:23:07 AM »
>> It's not my file - just copy it from one of your examples ..

sure. But once it's in your dictionary, it's _your_ table <g>.

>> is possible to save this log into tps or any other database format?

sure, it's just a table in your database with a field....

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 664
    • View Profile
    • Email
Re: Error and crash
« Reply #29 on: December 20, 2018, 03:55:38 AM »
don't work with SQL Table when compile received this error:

No matching prototype available - C:\Apps\Fecipur\FECIPUR002.clw:1304,18

self.AddLog(WebLog,WEBLOG1:DataLine,GLO:WebLogName,'<request>' & clip(p_Data) & '</request>',p_ip)

only compile with DOS table..