NetTalk Central

Author Topic: Error and crash  (Read 10866 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Error and crash
« on: November 16, 2018, 04:09:32 AM »
finally I was able to run one of my programs without the service in one of my clients and curiously when there was no one connected at 11:00 pm he gave the error that is attached, but I have no idea how to solve or what causes it

NT 10.32

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Error and crash
« Reply #1 on: November 18, 2018, 06:03:14 AM »
Do you have GPF Reporter?
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Re: Error and crash
« Reply #2 on: November 18, 2018, 02:36:48 PM »
no.

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Error and crash
« Reply #3 on: November 18, 2018, 03:48:28 PM »
Anything scheduled to run in your app at that particular time?  Not much to go on.

GPF Reporter is an awesome tool for just this sort of thing.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Error and crash
« Reply #4 on: November 19, 2018, 11:14:05 PM »
Hi Osa,

Note that it says Thread 773. That suggests you are leaking threads and the program simply ran out of memory.
Or perhaps your max threads setting is waaay too high. The program likely ran out of memory and was terminated.

For generally more useful stack information see
https://clarionhub.com/t/how-to-improve-the-call-stack-when-your-program-gpfs/188

But I think in this case the thread number is the clue.

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Re: Error and crash
« Reply #5 on: November 20, 2018, 04:43:53 AM »
my max threads is 1000 is too high? what is a correct setting for this??

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Error and crash
« Reply #6 on: November 21, 2018, 10:32:29 PM »
Osa,

yes 1000 is likely too high.
Each thread uses some amount of Ram while it is running - the exact amount depends a lot on the size of your dictionary.
(Since all threaded structures take up ram on each thread, and dict tables are usually threaded.)

A recommended number is around 100 - that seems good for most apps - but you can measure, and experiment, to find the "highest" number for your app if you like. (In your case I'd guess the highest number is 772, but hey, you might want to build some room into that so say 500)

Note this is NOT the "number of simultaneous users" = it's the number of _threads_ which is a very different thing. You can easily do thousands of users on a very small number of threads.

Cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Re: Error and crash
« Reply #7 on: November 22, 2018, 05:06:53 AM »
i changed to 500, but you said "That suggests you are leaking threads and the program simply ran out of memory."
How leaking is produced? sorry for my ignorance in this topic, and how i can detected.

Thanks..

Matthew51

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • Email
Re: Error and crash
« Reply #8 on: November 22, 2018, 04:45:57 PM »
Anything that could stop a thread from reaching an end will cause leaks.  Endless loops, and waiting for resources that are never available are some of the most common causes.  It cold also be something that takes a long time (but does end) and the user thinks nothing is happening so they keep mashing the button.

For me I looked at an SQL report of the most run queries and found an endless loop.

Keep an eye on your thread count.  Unless your server is very busy is should be below 10 almost all the time.  If it's over that for more then a few seconds start looking at what the computer and your database are doing.
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Error and crash
« Reply #9 on: November 22, 2018, 11:00:38 PM »
or a MESSAGE window popping up....

cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Re: Error and crash
« Reply #10 on: November 23, 2018, 05:02:01 AM »
Matthew51 thanks for your comment.

"It cold also be something that takes a long time (but does end) and the user thinks nothing is happening so they keep mashing the button."

I have a report that consumes a little time but has a progress bar, what happens if the user clicks repeatedly and closes the browser? that process is finished or a leaking is produced?

Bruce how do I control when the NT or clarion triggers a message? I saw a message when there was a waiting timeout to connect to the database to pop-up message of clarion, I do not control it, i checked all my code and it does not contain any message().

Matthew51

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • Email
Re: Error and crash
« Reply #11 on: November 23, 2018, 12:39:29 PM »
The server has no way of knowing if a user closed his browser. So if the user starts a report then exits the report will still finish and write the PDF to the disk.  NetTalk deletes the files after about a day if the user doesn't download it.

Nettalk will only make a message box directly if you don't have suppress error messages turned on (you should have it turned on).  Clarion has the ErrorManiger class that can create message boxes.  ErrorManiger is used by FileManager when it runs into an error like invalid record declarations and write errors.  NetTalk uses FileManager for most or all of its file access.

I've extended my ErrorManager so that it writes the error to a file rather then calling Message(). 

I've also installed capesoft's Message Box template.  This let me add code to log all messages, and set a short time out so calls to Message() won't halt a thread till user intervention.
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Re: Error and crash
« Reply #12 on: November 23, 2018, 01:00:22 PM »
i have it turned on the suppress error messages all the time and don't how a clarion message error is appeared.

"I've extended my ErrorManager so that it writes the error to a file rather then calling Message().  "

how do you that?

thanks..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Error and crash
« Reply #13 on: November 25, 2018, 09:43:06 PM »
Hi Osa,

>> I've also installed capesoft's Message Box template.  This let me add code to log all messages, and set a short time out so calls to Message() won't halt a thread till user intervention.

This is the simplest way to suppress MESSAGE windows.

Cheers
Bruce

osquiabro

  • Hero Member
  • *****
  • Posts: 666
    • View Profile
    • Email
Re: Error and crash
« Reply #14 on: November 27, 2018, 05:05:55 AM »
hello, bruce, my system ran for 7 days without problems, but today in the morning it hangs up, there are no messages or errors on the screen. but can not run the login page, 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? Without an error on the screen it is very difficult to know what is happening.

The system is simple only makes queries to a database, before version 10 did not have this problem.