0

I have a php website and If I press on F5 on my browser I get this CPU load :

$ w 11:34:54 up 16 days, 1 min, 5 users, load average: 90,81, 32,02, 12,57

It come from every pages on my website ! So I believe it come not from the algorithm but from the apache configuration ? I'm not completly sure about that.

I use PHP (with codeigniter), mongoDB with a single connexion. I use a global constant to use my connexion and reuse it every time. I don't create a new connexion on each request. almost all webpage answers in less than 300ms.

So does it come from apache (and then I ask my question in the right stackechange website), or does it come from my global PHP connexion (and then, I will switch to stackoverflow).

Or does it come from an other parameter ? If it come from apache, is there a way to limit the number of connexion at the same time ? Because loading the same page over and over without waiting that the first request finish is not the right behavior.

So someone can put my server down only by pressing F5... If it was a DDOS ok, but "just" a DOS...

Thanks you,

A.

1
  • check with top/htop on your server what happens when you press F5 looks more like some wild-running proccesses. or just do a reboot Sep 5, 2013 at 19:51

1 Answer 1

1

You could try the following modules

  • mod_evasive (Denial of Service evasion module for Apache)
  • mod_limitipconn (Simultaneous connection limiting module for Apache)
  • mod_cband (Apache 2 module provided to solve the problem of limiting users’ and virtualhosts’ bandwidth usage.)

The thread may be useful too

One more thing. You can setup nginx behind apache, as it has very flexible rate limiting capabilities

1
  • Thank you, it seams like a good way to solve my problem !
    – Antoine
    Sep 5, 2013 at 10:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .