J
J
Justin Bieber2016-09-15 11:31:15
MySQL
Justin Bieber, 2016-09-15 11:31:15

Why does the site crash when pressing F5?

There is a site on DLE, we used to sit on a regular hosting, and noticed a vulnerability.
You press F5 for 15-20 seconds and the site just crashes for about five minutes.

We recently moved to VPS, now the site does not hang during database backups, it stopped hanging even at F5, the maximum now wakes up after 10 seconds after clamping

. :D

Answer the question

In order to leave comments, you need to log in

6 answer(s)
E
Eugene_Eesti, 2016-09-20
@JustinBieber

Put Mod_Evasive on the server and you will have universal happiness.
For Debian/Ubuntu
After the installation is complete, go to the configuration file evasive.conf
file contents. The required lines need to be uncommented!
#DOSHashTableSize 3097
#DOSPageCount 2
#DOSSiteCount 50
#DOSPageInterval 1
#DOSSiteInterval 1
#DOSBlockingPeriod 10
#DOSEmailNotify [email protected]
#DOSSystemCommand "su - someuser -c '/sbin/... %s ...'"
#DOSLogDir " /var/log/mod_evasive"
Can this code be added to Apache2
Finally, let's create a log directory
and restart Apache2
--------------------
You can also set the number of simultaneous connections at the Nginx level.
No CMS has anything to do with it, it's a crookedly configured server.
It is best for you to hire an admin who will correctly configure the server.
Something like that. inspired :)
And this resource will help you https://gtmetrix.com/

M
Maxim, 2016-09-15
@pudovMaxim

Crooked website, crooked hands, crooked VPS. Maybe all at once.
Essentially the issue: check the performance of the site, find bottlenecks. Assess hardware requirements. Check cache. Stop pressing f5.

V
Vladislav 21rpk, 2016-09-15
@vlad7rpk

This is called http flood. There are plenty of protection methods on the net. Usually nginx is installed and limits the number of requests in a period of time from one IP.

S
Sergey Zelensky, 2016-09-15
@SergeyZelensky-Rostov

the server is not configured correctly / not optimally, you need to look for the reason, what is on vds (parameters), what is the stack on the backend

A
azsx, 2016-09-15
@azsx

Caching, probably not at all.

V
Vlad Odies, 2016-09-15
@odies

Hosting or vds have nothing to do with it. This is a known DLE bug. Solved by adding code to index
<?php
session_start(); // Start session
$ts = time(); // Get the current time
$s_time = (empty($_SESSION["time"]))? 0: $_SESSION["time"]; // If the user accesses the script for the first time, then set the value to 0, otherwise we take it from the session
$_SESSION["time"] = $ts; // Update the session value
if ($ts - $s_time > 2) { // If more than 2 seconds have passed since the previous call
echo "This is a complicated script"; // Execute the script
}
else echo "Stop refreshing the page!"; // Display an error message
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question