the script is a silly trivial example of how a more complex script with a loop that is not obvious could cause a major issue.
the scripts ran indefinitely despite the timeout. the server had to manually restarted.
From: Jeroen Geilman [jeroen@xxxxxxxxx]
Sent: Sunday, June 19, 2011 8:46 PM
To: users@xxxxxxxxxxxxxxxx Subject: Re: What does Timeout in the httpd.conf file accomplish? On 06/20/2011 02:38 AM, Zaccone, Warren wrote:
You're requesting a single URL 300 times concurrently. This means that apache has to dedicate 300 threads at once to this purpose. this is a trivial test case.
If you're not running worker, and your minspare is lower than 250 or so, it's going to take MINUTES to even get to number 300. As documented, when many new (prefork) threads are being requested at once, apache will only spawn one per second, to protect itself from attacks and runaway processes. the point is not how the situation was produced, but rather why aren't the 256 workers that are running this script stoppe. I know that I started more than 300.
And the request does nothing for 20 seconds before returning. What exactly are you testing here ? reproducing fact. that a single user of my server can bring down the server with a simple script. running it from the unix command prompt is not realistic, but it is realistic that an automated script from another server could be doing so.
As documented, Timeout determines the maximum number of seconds that a single request may take. I am afraid not - each of the copies of httpd running the above script ran indefinitely.
Yes, Timeout works on the HTTP level, so everything sent over HTTP is affected by it. This means everything.
Then that apachebench run you show above is bloody stupid. please Explain?
You can't even SERVE 300 concurrent requests.
If you run PHP, this kills apache. Eventually.
You have no idea what you are doing. This was entirely unnecessary. Why do you say this. I am reproducing an ellusive situation with a trival test case.., there is no reason to get personal. I thought this forum was a place people could ask silly questions
and not be attacked.
-- J. |