When our users are refreshing the Moodle webpage very fast multiple times the Moodle website freezes due to many database connections. Note it is a school so users will try to break this server into pieces.
This happens when users are keep refreshing the Moodle website.
Piece of netstat -ap
unix 3 [ ] STREAM CONNECTED 168365 11128/apache2
unix 3 [ ] STREAM CONNECTED 168343 2192/mysqld /var/run/mysqld/mysqld.sock
unix 3 [ ] STREAM CONNECTED 168342 11114/apache2
unix 3 [ ] STREAM CONNECTED 168341 2192/mysqld /var/run/mysqld/mysqld.sock
unix 3 [ ] STREAM CONNECTED 168340 11113/apache2
unix 3 [ ] STREAM CONNECTED 168319 2192/mysqld /var/run/mysqld/mysqld.sock
These connections will grow on each attempt to refresh the website. After a certain point the Moodle webserver thinks its enough and it wont show the Webpage until all connections are closed (this takes minutes )
What are the necessary steps to solve this problem.
Thanks in advance,