Board index » delphi » IdHttpServer CPU Maxed Out

IdHttpServer CPU Maxed Out


2003-09-03 10:31:39 PM
delphi201
I'm using a TIdHttpServer in a TService. It runs pretty good but in load
testing, if I hit it with 20 or more requests at the same time, the service
pegs the processor at 100 percent and stays there. Requests are not
processed. It seems to lock up. The machine will respond to mouse/keyboard
input, but it is slow because the service is consuming the processor. It
stays like this indefinately until is stop the service.
Any ideas on what is going on here or how to fix it. I was under the
impression that the TIdHttpServer was supposed to be able to handle this
kind of load and much more.
 
 

Re:IdHttpServer CPU Maxed Out

perform some SLEEPS(0) in your threads after each read if data.
don't loop until no data. it i will hold up things.
Peter Schwenk writes:
Quote
I'm using a TIdHttpServer in a TService. It runs pretty good but in load
testing, if I hit it with 20 or more requests at the same time, the service
pegs the processor at 100 percent and stays there. Requests are not
processed. It seems to lock up. The machine will respond to mouse/keyboard
input, but it is slow because the service is consuming the processor. It
stays like this indefinately until is stop the service.

Any ideas on what is going on here or how to fix it. I was under the
impression that the TIdHttpServer was supposed to be able to handle this
kind of load and much more.
 

Re:IdHttpServer CPU Maxed Out

"Peter Schwenk" <XXXX@XXXXX.COM>wrote in
Quote
Any ideas on what is going on here or how to fix it. I was under the
impression that the TIdHttpServer was supposed to be able to handle this
kind of load and much more.
You have a run away thread, or are thrashing in on of your events.
Is Indy useful to you? Send a postcard please!
www.hower.org/kudzu/indypost.html
ELKNews - Get your free copy at www.atozedsoftware.com
 

Re:IdHttpServer CPU Maxed Out

"Peter Schwenk" <XXXX@XXXXX.COM>writes
Quote
I'm using a TIdHttpServer in a TService. It runs pretty good but in load
testing, if I hit it with 20 or more requests at the same time, the
service
pegs the processor at 100 percent and stays there. Requests are not
processed. It seems to lock up. The machine will respond to
mouse/keyboard
input, but it is slow because the service is consuming the processor. It
stays like this indefinately until is stop the service.

I suspect that Chad is right. I just so happened that I was in a position
ot test this easily as my current app. polls several HTTP servers to monitor
stuff & it is easy to just add more poller windows/threads pointing at the
same server. I set 30 pollers going, GETting an HTML page every second,
spread over three client machines, & there was no problem, though the
server/network was geting really busy by this time.
I do have problems shutting the server down with clients connected, but the
server does not crash/loop when busy.
Rgds,
Martin