0

i have an apache 2.2 with

ServerLimit        50
MaxClients         50

now when i run jmeter wth 50 threads and keep alive checked, all slots belong to jmeter. And i can't access the page with my browser.

i aleady tried

MaxRequestsPerChild  1

but this didn't change any thing

is there any out-of-the-box solution in apache to prevent one client using all slots?

wutzebaer
  • 129
  • 8
  • What actual problem are you trying to solve? This is essentially how Prefork works. Depending on the problem, there are different possibly solutions. – Chris S Sep 06 '13 at 13:19
  • the problem is that someone can dos my server just by running jmeter with 50 threads. And no other client will getting any response – wutzebaer Sep 06 '13 at 13:31
  • Have you tried using `mod-evasive`? It's specifically designed to detect DoS attacks and block their IP at the firewall level. – Chris S Sep 06 '13 at 13:55

1 Answers1

0

I don't see this specified, so try adding KeepAliveTimeout 5 to your apache configuration. Also, why only 50 MaxClients? You must have a very tiny server for it to be set this low.

MaxRequestsPerChild doesn't do anything as any requests through a KeepAlive counts as a single request as far as Apache is concerned. In this configuration (prefork), you can leave out ServerLimit entirely.

Nathan C
  • 14,901
  • 4
  • 42
  • 62
  • if i set it to 150 i can set jmeter to 150 threads... thats no solution.. and KeepAliveTimeout won't work because jmeter runns infinite and does not time out – wutzebaer Sep 06 '13 at 20:16
  • Why are you using `jmeter` to do this? Apachebench (`ab`) is a much better indication of real-world usage. However, you can take a look at [mod_evasive](http://www.zdziarski.com/blog/?page_id=442) and configure it to prevent client exhaustion. – Nathan C Sep 07 '13 at 01:07