NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on May 05, 2018, 06:42:31 AM

Title: Thread Pool problem
Post by: Alberto 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.
Title: Re: Thread Pool problem
Post by: Bruce 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
Title: Re: Thread Pool problem
Post by: Alberto 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.
Title: Re: Thread Pool problem
Post by: Bruce 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
Title: Re: Thread Pool problem
Post by: Alberto 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
Title: Re: Thread Pool problem
Post by: Bruce 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