Denial of Service (MySQL)
Invicti identified a MySQL denial of service due to too many connections.
Several triggers cause this, including: possible DoS attack, high usage, not optimized MySQL server, or poorly developed server-side code.
In order to fix this problem, you should first determine what causes this. Some suggestions:
max_connectionssettings in the MySQL configuration file, which is located in the MySQL installation folder for Windows systems, and
/etc/my.cnffor Unix/Linux-like systems.
- Do not use persistent connections on your code. This is possible only for PHP systems by disabling it through the setting on
- Ensure you explicitly close the database connections.
- Ensure you close opened database connections when an error occurs in the code.
- Lower the MySQL connection timeout.