nohumanman / descenders-modkit

Scripts for modding and a server-driven split timer system for Descenders
https://modkit.nohumanman.com
GNU General Public License v3.0
4 stars 0 forks source link

Too many get requests causing server crashes #23

Closed nohumanman closed 11 months ago

nohumanman commented 11 months ago

Instead of http polling, websockets should be used. This could also be caused by creating an SQL Connection on each database request - research on how sqlite3 databases are most optimally accessed is needed.

Due to the lowly set timeout in apache (to prevent server from freezing):

Timeout when reading response headers from daemon process 'split_timer': /var/www/descenders-modkit/yourapplication.wsgi, referer: https://split-timer.nohumanman.com/
nohumanman commented 11 months ago

This is still an issue, apache2 in top repeatedly uses over 50% in bursts. Not sure what is causing this.

Might be a good idea to log amount of get requests to see if that's the issue or if it's database access or another issue.

nohumanman commented 11 months ago

It seems apache2 increases CPU usage drastically in any get requests that utilise the def permission() in webserver.py. This method needs to be optimised.