NetTalk Central

Author Topic: Thread Pool problem  (Read 4805 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Thread Pool problem
« on: May 05, 2018, 06:42:31 AM »
NT 10.20 , Ive added pooling to the web server app following the docs intructions.

When it runs, it takes 15/25% of CPU doing nothing, at the first request, the server takes 50% of the CPU and stays using this 50% even if its not receiving any request.

Ive tested it with the example 71 (Books) and same problem.
« Last Edit: May 05, 2018, 07:06:47 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Thread Pool problem
« Reply #1 on: May 07, 2018, 07:15:15 AM »
Hi Alberto,

did you use the "out the box" web71 example?
Or did you alter it?

I've just tried it here, and I'm not seeing the same effect as you - here the CPU usages is basically 0%.

Any clues on how I can duplicate the effect you are getting?

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Thread Pool problem
« Reply #2 on: May 07, 2018, 09:42:39 AM »
Sory, you are right, I dont know what happen.
Ive imported the proc from the ex 71 and my app continuos to consume50% cpu wtihout requests and if I close it with the clos button the windows closes but the exe is still running, have to kill it.
Ive tested all WebServer and Webhandler and theres nothing weird...
Any idea of what else to check?
If I desable pooling all runs ok.
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Thread Pool problem
« Reply #3 on: May 09, 2018, 04:47:41 AM »
Hard to guess without an example.
you could make the pool windows visible (just go into the procedure, and look for the window{prop:hide statement).

Maybe take one of the other examples, and add thread pooling to it, and see if you can get the same effect? (and if you can then post that example)?

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Thread Pool problem
« Reply #4 on: May 10, 2018, 03:55:37 AM »
Ive unhided the pool window and what I see is some windows opened, some windows closed but which existance can be seen in windows with Alt-TAb but cant be selected or unhided, the perfomance tab shows 8 pools and I can select only the pool 9 windows and thr pool 10 window.
If you count the windows, that wich I cant select and wich I can then there are 8 windows, which match with the pool number shown in the perfomance tab.
Besides... that windows pool 4,5,6,8,7 cant be closed.
Killing the main exe let the windows I cant select running using this CPU %
I think the problem is the pool windows are not been closed.
Please see image
« Last Edit: May 10, 2018, 04:02:09 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Thread Pool problem
« Reply #5 on: May 11, 2018, 01:25:02 AM »
The pool windows are not supposed to be closed. That's the whole point, they remain open.

The fact that some can't be closed suggest the thread is "still running". This would agree with your cpu usage problem.

So, I think you have a bug in your code or something where a request is not completing for some reason. This then locks the thread, and seems like it's using cpu as well.

So I think the only way to help you on this one is with an example...

cheers
Bruce