Topic: Database locking causing 503 during load testing
Hello,
my setup is: vps with Centos 6.6, nginx, php-fpm, sqlite3
under light load testing with as little as 2 concurrent users the forum is returning 503 service unavailable errors
error logs point to database locking... any ideas on what would cause the forum to fail under such light load?
I get lots of the following errors in my logs:
2017/06/23 09:36:06 [error] 19238#19238: *20463 FastCGI sent in stderr: "PHP message: PHP Warning: SQLite3::query(): Unable to execute statement: database is locked in /usr/share/nginx/html/example/forum/include/dblayer/sqlite3.php on line 96
PHP message: PHP Warning: SQLite3::exec(): cannot rollback transaction - SQL statements in progress in /usr/share/nginx/html/example/forum/include/dblayer/sqlite3.php on line 116" while reading response header from upstream, client: 54.172.97.126, server: example.com, request: "GET /forum/viewtopic.php?id=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "example.com"
2017/06/23 09:36:06 [error] 19238#19238: *20459 FastCGI sent in stderr: "PHP message: PHP Warning: SQLite3::query(): Unable to prepare statement: 5, database is locked in /usr/share/nginx/html/example/forum/include/dblayer/sqlite3.php on line 96" while reading response header from upstream, client: 54.172.97.126, server: example.com, request: "GET /forum/viewtopic.php?id=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "example.com"