So I recently created a new VPS instance with Hetzner since Debian 10 became outdated.
I'm running Debian 12 now, but this new instance seems to be giving me random internal server 500 errors.

The specs are all the same.
I even transferred over fewer websites (since some weren't being used as much) compared to what I had on the old one.

I added 2GB of swap (for the 2GB RAM instance).
And then installed wordops so that I could recreate the websites.
Everything was backed up/restored using updraft
I even removed netdata from the server since I don't need those stats

But I had noticed that all of the websites were dropping (500 error) even when I still had available ram.
The two cpu cores aren't being maxed out

I can monitor stats with "htop"
but once something triggers it, all websites drop (even though SSH performs just fine)
and I can continue watching the data in "htop" while those servers are down.

at first I though it was wprocket and its pre-load feature. so I disabled that (on two websites)
that seems to have stopped the issue from happening as often.
but still, this morning, I go to begin working on new content and I'm greeted with this error on all of my sites

a quick reboot fixes things, but this is not ideal and I'm confused as to how to troubleshoot this since the hardware isn't being maxed out

do you think I just got a wonky vps instance and should create a new one?
how else can I try to find what is causing this?

What do you find in the error logs when the error 500 pops up?

    portofacil which log file is the best to look at when all of the websites on the server give the 500 error?

    just the regular error.log file?
    or should i look into each website's error.log file?

    so it happened again today, and I grabbed the last bits of three error log files
    two were from the dedicated website error.log files
    while the third is just the generic error.log file
    the generic error.log file doesn't list anything since the 10th of this month

    but I am seeing this in one of the dedicated website error log files. . .

    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439" while reading response header from upstream, client: 34.90.35.13, server: playstorefinder.com, request: "GET /product-tag/tools HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-two-fpm.sock:", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92990 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439" while reading response header from upstream, client: 34.32.135.36, server: playstorefinder.com, request: "GET /game/epic-conquest-2 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-fpm.sock:", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92937 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439", client: 35.204.209.81, server: playstorefinder.com, request: "GET /weather HTTP/2.0", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92991 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439" while reading response header from upstream, client: 34.90.35.13, server: playstorefinder.com, request: "GET /product-tag/tools/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-two-fpm.sock:", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92991 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439", client: 34.90.35.13, server: playstorefinder.com, request: "GET /product-tag/tools/ HTTP/2.0", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92992 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439" while reading response header from upstream, client: 34.32.135.36, server: playstorefinder.com, request: "GET /game/epic-conquest-2/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-fpm.sock:", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92992 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')
    #3 {main}
    thrown in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php on line 439", client: 34.32.135.36, server: playstorefinder.com, request: "GET /game/epic-conquest-2/ HTTP/2.0", host: "playstorefinder.com"
    2024/07/13 16:34:33 [error] 916#916: *92981 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php:439
    Stack trace:
    #0 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(439): mysqli_real_connect()
    #1 /var/www/playstorefinder.com/htdocs/wp-content/plugins/ninjafirewall/lib/firewall.php(93): nfw_connect()
    #2 /var/www/playstorefinder.com/htdocs/wp-content/nfwlog/ninjafirewall.php(10): include_once('...')

    I have just disabled that plugin on two websites that are running it
    I do find it odd that it's having some sort of trouble now, as again, I ran it just fine on the debian 10 vps instance (maybe it borked on the backup/restore process?

    6 days later

    I had thought the ninja firewall was causing this issue. and after disabling that plugin on two sites, the 500 internal server error did seem to be fixed

    however, it happened again today, and in the error.log file I'm seeing this. . .

    2024/07/16 17:24:00 [crit] 917#917: unlink() "/var/run/nginx-cache/2/23/e4f72e52424f934acc88af096cc41232" failed (2: No such file or directory)
    2024/07/16 17:24:41 [crit] 917#917: unlink() "/var/run/nginx-cache/e/24/d622622a0f8bc3a654f08a2daaecf24e" failed (2: No such file or directory)
    2024/07/16 17:25:37 [crit] 917#917: unlink() "/var/run/nginx-cache/1/6f/b07eeb890820ec7ed3ef7b60eedfa6f1" failed (2: No such file or directory)
    2024/07/16 17:26:31 [crit] 917#917: unlink() "/var/run/nginx-cache/c/9b/c5484c734d399b49ae9bef05e8b399bc" failed (2: No such file or directory)
    2024/07/16 17:27:17 [crit] 917#917: unlink() "/var/run/nginx-cache/8/4d/36740d0a9664ca5d7b31df24a421a4d8" failed (2: No such file or directory)
    2024/07/16 17:27:57 [crit] 917#917: unlink() "/var/run/nginx-cache/4/a6/940bd32c6b5bd206fb20331d3a908a64" failed (2: No such file or directory)
    2024/07/16 17:28:19 [crit] 917#917: unlink() "/var/run/nginx-cache/d/d5/55f05b09566dcc205746ebefdaf27d5d" failed (2: No such file or directory)
    2024/07/16 17:28:44 [crit] 917#917: unlink() "/var/run/nginx-cache/7/ab/69425c01a945467087852c45686d0ab7" failed (2: No such file or directory)
    2024/07/16 17:31:58 [crit] 917#917: unlink() "/var/run/nginx-cache/1/d2/a333fa81edd494fc9e4c8f7d668c2d21" failed (2: No such file or directory)
    2024/07/16 17:33:55 [crit] 917#917: unlink() "/var/run/nginx-cache/5/dc/aaaa81145370e044cf58587b08970dc5" failed (2: No such file or directory)
    2024/07/16 17:34:12 [crit] 917#917: unlink() "/var/run/nginx-cache/0/1f/8b1e432be61871dfde9e7e8373ebb1f0" failed (2: No such file or directory)
    2024/07/16 17:35:01 [crit] 917#917: unlink() "/var/run/nginx-cache/c/5d/018231a8d5b2b11c41e07d172d27a5dc" failed (2: No such file or directory)
    2024/07/16 17:35:43 [crit] 917#917: unlink() "/var/run/nginx-cache/f/1b/6484c9c13f698979adbd864aef1541bf" failed (2: No such file or directory)
    2024/07/16 17:36:09 [crit] 917#917: unlink() "/var/run/nginx-cache/2/35/49e9c74a134ecabfa9d25273a9533352" failed (2: No such file or directory)
    2024/07/16 17:36:30 [crit] 917#917: unlink() "/var/run/nginx-cache/a/99/30f74c3b785fa9308825de455244b99a" failed (2: No such file or directory)
    2024/07/16 17:37:48 [crit] 917#917: unlink() "/var/run/nginx-cache/6/53/defa2f82694a93682f6fa318b83ea536" failed (2: No such file or directory)
    2024/07/16 17:37:58 [crit] 917#917: unlink() "/var/run/nginx-cache/3/e2/8ecdf2a3591b6b5bdca4c92341641e23" failed (2: No such file or directory)
    2024/07/16 17:38:09 [crit] 917#917: unlink() "/var/run/nginx-cache/b/dd/9df22f6db55ba57e78ac69f7867b7ddb" failed (2: No such file or directory)
    2024/07/16 17:38:58 [crit] 917#917: unlink() "/var/run/nginx-cache/d/e2/07e07c106d21ac3644de5b3bf651ee2d" failed (2: No such file or directory)
    2024/07/16 17:41:10 [crit] 917#917: unlink() "/var/run/nginx-cache/f/e7/3391ea65636b71ab994a297a353d3e7f" failed (2: No such file or directory)
    2024/07/16 17:44:30 [crit] 917#917: unlink() "/var/run/nginx-cache/e/77/e69dfd15a04b78e5cfc641a0d8f5777e" failed (2: No such file or directory)
    2024/07/16 17:45:52 [crit] 917#917: unlink() "/var/run/nginx-cache/1/fa/239423cf272ee97980ad98c8d1da0fa1" failed (2: No such file or directory)
    2024/07/16 17:45:52 [crit] 917#917: unlink() "/var/run/nginx-cache/c/2f/4244bad10b6fcfe78a24e893071542fc" failed (2: No such file or directory)
    2024/07/16 17:46:39 [crit] 917#917: unlink() "/var/run/nginx-cache/2/55/5d5f101b088f087788ee8ca74b2a4552" failed (2: No such file or directory)
    2024/07/16 17:47:35 [crit] 917#917: unlink() "/var/run/nginx-cache/f/cb/f2ebed11a0748fdaf095903c395e6cbf" failed (2: No such file or directory)
    2024/07/16 17:51:17 [crit] 917#917: unlink() "/var/run/nginx-cache/6/e0/9e499579b68bed00622994a158d6be06" failed (2: No such file or directory)
    2024/07/16 17:54:27 [crit] 917#917: unlink() "/var/run/nginx-cache/6/5d/e68a00a28a1a04c035ad878a8ffda5d6" failed (2: No such file or directory)
    2024/07/16 17:57:15 [crit] 917#917: unlink() "/var/run/nginx-cache/f/50/355ee5190548924417d4e3b7bb5e450f" failed (2: No such file or directory)
    2024/07/16 17:57:43 [crit] 917#917: unlink() "/var/run/nginx-cache/2/fd/b6361b0f9419a1ff279a6798a7ca1fd2" failed (2: No such file or directory)
    2024/07/16 17:58:57 [crit] 917#917: unlink() "/var/run/nginx-cache/6/96/195e4500a0f2a3baf3e82ac89b2a4966" failed (2: No such file or directory)
    2024/07/16 18:00:09 [crit] 917#917: unlink() "/var/run/nginx-cache/6/95/517971e4259f7f1b9bc9134bcdc07956" failed (2: No such file or directory)
    2024/07/16 18:02:27 [crit] 917#917: unlink() "/var/run/nginx-cache/c/e1/1ed4c686981d904fd0e1b1e7ba45ae1c" failed (2: No such file or directory)
    2024/07/16 18:03:05 [crit] 917#917: unlink() "/var/run/nginx-cache/9/57/af871677b893c0549f62ffa275058579" failed (2: No such file or directory)
    2024/07/16 18:03:48 [crit] 917#917: unlink() "/var/run/nginx-cache/1/49/d526d5ac753feb1f10fa63fa281f4491" failed (2: No such file or directory)
    2024/07/16 18:05:57 [crit] 917#917: unlink() "/var/run/nginx-cache/5/c7/f24b8d2271c082061528203b9923ac75" failed (2: No such file or directory)
    2024/07/16 18:06:41 [crit] 917#917: unlink() "/var/run/nginx-cache/9/df/eb5a1962f2db63e4c5d14cb2def6adf9" failed (2: No such file or directory)
    2024/07/16 18:08:52 [crit] 917#917: unlink() "/var/run/nginx-cache/3/33/816066d08a5e68fdd94275d46c031333" failed (2: No such file or directory)
    2024/07/16 18:11:43 [crit] 917#917: unlink() "/var/run/nginx-cache/0/9e/7f450f5fc76106d00e3cd520e51f29e0" failed (2: No such file or directory)
    2024/07/16 18:12:43 [crit] 917#917: unlink() "/var/run/nginx-cache/a/2e/250dbf0f9131497bf2828677adf482ea" failed (2: No such file or directory)
    2024/07/16 18:12:44 [crit] 917#917: unlink() "/var/run/nginx-cache/3/f8/82a0b2ee5d83e14ec23d365d88c86f83" failed (2: No such file or directory)
    2024/07/16 18:12:47 [crit] 917#917: unlink() "/var/run/nginx-cache/d/12/f6bb4820894f278f0ecd23e1ea64012d" failed (2: No such file or directory)
    2024/07/16 18:14:36 [crit] 917#917: unlink() "/var/run/nginx-cache/e/e4/042ac2a5e0f49aaf6e16302741f12e4e" failed (2: No such file or directory)
    2024/07/16 18:17:42 [crit] 917#917: unlink() "/var/run/nginx-cache/b/cc/f1acca15dc7474a6d65f8b066a060ccb" failed (2: No such file or directory)
    2024/07/16 18:17:43 [crit] 917#917: unlink() "/var/run/nginx-cache/1/d4/895504cc899fe83ce50bb91eef267d41" failed (2: No such file or directory)
    2024/07/16 18:18:28 [crit] 917#917: unlink() "/var/run/nginx-cache/7/8f/c473af8439b0532cc299439c2a6f18f7" failed (2: No such file or directory)
    2024/07/16 18:19:16 [crit] 917#917: unlink() "/var/run/nginx-cache/9/9a/b6fe504b890a3cd14687309530fe89a9" failed (2: No such file or directory)
    2024/07/16 18:19:40 [crit] 917#917: unlink() "/var/run/nginx-cache/7/4e/7cae8983ae3162b33d51776de0d7b4e7" failed (2: No such file or directory)
    2024/07/16 18:20:14 [crit] 917#917: unlink() "/var/run/nginx-cache/4/95/28b5aab602172c9c3b7ed84a5f159954" failed (2: No such file or directory)
    2024/07/16 18:20:56 [crit] 917#917: unlink() "/var/run/nginx-cache/c/f1/3a9bb1d1bd5a2b8e01ac937a13646f1c" failed (2: No such file or directory)
    2024/07/16 18:20:57 [crit] 917#917: unlink() "/var/run/nginx-cache/b/3c/ca9e7dca94166b7f92ca50b0eb84f3cb" failed (2: No such file or directory)
    2024/07/16 18:22:39 [crit] 917#917: unlink() "/var/run/nginx-cache/0/af/cd06714792d5069139a4b1df0bec9af0" failed (2: No such file or directory)
    2024/07/16 18:23:05 [crit] 917#917: unlink() "/var/run/nginx-cache/5/4f/3ca7adf486eb913410daf24a80cb84f5" failed (2: No such file or directory)
    2024/07/16 18:24:51 [crit] 917#917: unlink() "/var/run/nginx-cache/8/cd/10f51f2b755c059c7d1c82fb97e3ecd8" failed (2: No such file or directory)
    2024/07/16 18:24:54 [crit] 917#917: unlink() "/var/run/nginx-cache/7/1b/771cda3ffbe6672a91739eb7840fb1b7" failed (2: No such file or directory)
    2024/07/16 18:26:26 [crit] 917#917: unlink() "/var/run/nginx-cache/0/2a/493b1eedfdb8b467e9a9c3e9410842a0" failed (2: No such file or directory)
    2024/07/16 18:26:27 [crit] 917#917: unlink() "/var/run/nginx-cache/6/b6/6b4593b8b4b2d2c7bf9041c62b3b4b66" failed (2: No such file or directory)
    2024/07/16 18:26:29 [crit] 917#917: unlink() "/var/run/nginx-cache/3/15/a462eb4f7a39f85ca90af96d5bf7b153" failed (2: No such file or directory)
    2024/07/16 18:26:29 [crit] 917#917: unlink() "/var/run/nginx-cache/8/e4/0116d4612d77fd376d711ae8bc8dce48" failed (2: No such file or directory)
    2024/07/16 18:26:31 [crit] 917#917: unlink() "/var/run/nginx-cache/d/7c/913d55bffda60d34e8b55368aca397cd" failed (2: No such file or directory)
    2024/07/16 18:26:32 [crit] 917#917: unlink() "/var/run/nginx-cache/1/1e/b649c45cb8987e19666ec90684b241e1" failed (2: No such file or directory)
    2024/07/16 18:26:32 [crit] 917#917: unlink() "/var/run/nginx-cache/9/97/73a5f5ae254f1f12b40f78a60fb1f979" failed (2: No such file or directory)
    2024/07/16 18:26:33 [crit] 917#917: unlink() "/var/run/nginx-cache/d/8d/ebd7e742c7e8bbc8624fc630183128dd" failed (2: No such file or directory)
    2024/07/16 18:26:33 [crit] 917#917: unlink() "/var/run/nginx-cache/3/31/e6bdac94b0386754194c1e2af0acb313" failed (2: No such file or directory)
    2024/07/16 18:26:35 [crit] 917#917: unlink() "/var/run/nginx-cache/6/a2/dca7d5b191ce6f97c4dc5032ee5f7a26" failed (2: No such file or directory)
    2024/07/16 18:31:28 [crit] 917#917: unlink() "/var/run/nginx-cache/9/75/39bfe2d3fbcf85918ecd19059c091759" failed (2: No such file or directory)
    2024/07/16 18:35:02 [crit] 917#917: unlink() "/var/run/nginx-cache/6/c7/bbbc6b6beaef4110f280d0386bb03c76" failed (2: No such file or directory)
    2024/07/16 18:36:09 [crit] 917#917: unlink() "/var/run/nginx-cache/a/f3/ed215c11446e85e88302a91a6e9f9f3a" failed (2: No such file or directory)

    I'm seeing a lot of fastcgi errors in the error.log file for a specific website of mine

    made me wonder if this would give any insight into what is going on. . .

    2024/07/21 22:07:54 [error] 26239#26239: *122943 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "post_content" on null in /var/www/playstoresales.com/htdocs/wp-content/plugins/totej-price-history/class-totejpricehistoryplugin.php on line 69" while reading response header from upstream, client: 34.1.24.150, server: playstoresales.com, request: "GET /checkout/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-two-fpm.sock:", host: "www.playstoresales.com"
    2024/07/21 22:07:54 [error] 26239#26239: *122946 access forbidden by rule, client: 34.1.24.150, server: playstoresales.com, request: "GET /wp-content/plugins/woocommerce/readme.txt HTTP/2.0", host: "www.playstoresales.com"
    2024/07/21 22:15:04 [error] 26239#26239: *123089 FastCGI sent in stderr: "PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1622; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1623; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1624; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1625; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1622; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1623; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1624; PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/playstoresales.com/htdocs/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1625; PHP
    2024/07/21 22:19:54 [error] 26239#26239: *123196 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "post_content" on null in /var/www/playstoresales.com/htdocs/wp-content/plugins/totej-price-history/class-totejpricehistoryplugin.php on line 69" while reading response header from upstream, client: 207.46.13.141, server: playstoresales.com, request: "GET /apps/featured/page/4/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-fpm.sock:", host: "www.playstoresales.com"
    2024/07/21 22:29:35 [error] 26239#26239: *123391 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "post_content" on null in /var/www/playstoresales.com/htdocs/wp-content/plugins/totej-price-history/class-totejpricehistoryplugin.php on line 69" while reading response header from upstream, client: 216.244.66.241, server: playstoresales.com, request: "GET /tags/powerline/feed/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-two-fpm.sock:", host: "www.playstoresales.com"
    2024/07/21 22:35:40 [error] 26239#26239: *123535 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "post_content" on null in /var/www/playstoresales.com/htdocs/wp-content/plugins/totej-price-history/class-totejpricehistoryplugin.php on line 69" while reading response header from upstream, client: 114.119.136.174, server: playstoresales.com, request: "GET /app/oreo-8-icon-pack/&sa=U HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-two-fpm.sock:", host: "www.playstoresales.com"
    2024/07/21 22:50:31 [error] 26240#26240: *124033 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "post_content" on null in /var/www/playstoresales.com/htdocs/wp-content/plugins/totej-price-history/class-totejpricehistoryplugin.php on line 69" while reading response header from upstream, client: 73.43.124.214, server: playstoresales.com, request: "GET /apps/sales/apps/page/2/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-fpm.sock:", host: "www.playstoresales.com"
    2024/07/21 22:54:11 [error] 26239#26239: *124288 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "post_content" on null in /var/www/playstoresales.com/htdocs/wp-content/plugins/totej-price-history/class-totejpricehistoryplugin.php on line 69" while reading response header from upstream, client: 73.43.124.214, server: playstoresales.com, request: "GET /apps/sales/games/page/5/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php82-two-fpm.sock:", host: "www.playstoresales.com"
    2024/07/21 22:58:27 [error] 26239#26239: *124672 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/www/playstoresales.com/htdocs/wp-content/cache/wp-rocket/www.playstoresales.com/app/electrodroid-pro): Failed to open directory: No such file or directory in /var/www/playstoresales.com/htdocs/wp-content/plugins/wp-rocket/inc/common/purge.php:124

    these seem to be popping up on multiple sites I have on the server. . .

    2024/07/21 12:05:31 [error] 26239#26239: *93714 access forbidden by rule, client: 210.211.116.24, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 12:18:31 [error] 26239#26239: *94380 access forbidden by rule, client: 2001:41d0:801:1000::af8, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 12:31:03 [error] 26240#26240: *94611 access forbidden by rule, client: 196.70.252.214, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 12:44:27 [error] 26239#26239: *95065 access forbidden by rule, client: 217.76.155.236, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 12:57:15 [error] 26240#26240: *95929 access forbidden by rule, client: 2803:4f20:c000:6:44f9:83ff:fe71:1607, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 13:10:40 [error] 26239#26239: *96733 access forbidden by rule, client: 210.211.116.24, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 13:30:37 [error] 26239#26239: *97477 access forbidden by rule, client: 64.42.179.67, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 14:17:00 [error] 26240#26240: *98973 access forbidden by rule, client: 217.138.252.123, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 15:32:44 [error] 26239#26239: *101837 access forbidden by rule, client: 103.48.50.193, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 15:46:13 [error] 26239#26239: *102569 access forbidden by rule, client: 51.79.26.235, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 15:59:32 [error] 26240#26240: *103244 limiting requests, excess: 1.285 by zone "one", client: 157.230.189.255, server: playsondeck.com, request: "POST /wp-login.php HTTP/2.0", host: "playsondeck.com", referrer: "https://playsondeck.com/wp-login.php?redirect_to=https%3A%2F%2Fplaysondeck.com%2Fwp-admin%2F"
    2024/07/21 16:18:45 [error] 26240#26240: *105165 access forbidden by rule, client: 194.187.251.91, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 16:39:43 [error] 26240#26240: *106022 access forbidden by rule, client: 194.55.186.87, server: playsondeck.com, request: "GET /.git/config HTTP/2.0", host: "playsondeck.com"
    2024/07/21 16:41:02 [error] 26239#26239: *106055 access forbidden by rule, client: 198.54.130.28, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 17:49:43 [error] 26240#26240: *109101 access forbidden by rule, client: 194.55.186.87, server: playsondeck.com, request: "GET /.git/config HTTP/2.0", host: "www.playsondeck.com"
    2024/07/21 17:59:34 [error] 26239#26239: *109742 access forbidden by rule, client: 213.152.161.211, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 18:28:21 [error] 26240#26240: *112617 access forbidden by rule, client: 213.152.161.20, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 18:48:09 [error] 26240#26240: *113403 access forbidden by rule, client: 213.152.161.181, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 19:03:24 [error] 26239#26239: *113948 access forbidden by rule, client: 83.147.52.49, server: playsondeck.com, request: "GET /.git/config HTTP/2.0", host: "playsondeck.com"
    2024/07/21 19:35:26 [error] 26240#26240: *116275 access forbidden by rule, client: 68.235.48.108, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 21:34:47 [error] 26240#26240: *121587 access forbidden by rule, client: 83.147.52.49, server: playsondeck.com, request: "GET /.git/config HTTP/2.0", host: "www.playsondeck.com"
    2024/07/21 21:58:18 [error] 26239#26239: *122673 access forbidden by rule, client: 86.105.9.67, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"
    2024/07/21 22:38:32 [error] 26240#26240: *123602 access forbidden by rule, client: 184.75.221.107, server: playsondeck.com, request: "POST /xmlrpc.php HTTP/2.0", host: "playsondeck.com"

    could this help to diagnose the issue @portofacil @VirtuBox

    a month later

    I'm still having this issue. . .and it's even migrated over to new VPS instances that I have created (in an attempt to fix the issue).

    the errors.log file reads this. . .

    2024/08/27 13:37:44 [crit] 1081#1081: unlink() "/var/run/nginx-cache/6/d9/dc366365da90a9c93ff0a2a867655d96" failed (2: No such file or directory)
    2024/08/27 13:46:25 [crit] 1081#1081: unlink() "/var/run/nginx-cache/4/4d/0c2a93ad34e252e48856ce152e7db4d4" failed (2: No such file or directory)
    2024/08/27 15:22:52 [crit] 1081#1081: unlink() "/var/run/nginx-cache/a/ba/89e8a07afd44785981363769c2e55baa" failed (2: No such file or directory)
    2024/08/27 15:22:53 [crit] 1081#1081: unlink() "/var/run/nginx-cache/c/af/d9df871b8fe1f6e37d672b21141e8afc" failed (2: No such file or directory)
    2024/08/27 15:22:54 [crit] 1081#1081: unlink() "/var/run/nginx-cache/f/22/e4f8357257b6c098a4063a0d1d43c22f" failed (2: No such file or directory)
    2024/08/27 15:23:02 [crit] 1081#1081: unlink() "/var/run/nginx-cache/b/d4/4a30fde045424faa54a03baa24112d4b" failed (2: No such file or directory)
    2024/08/27 15:23:10 [crit] 1081#1081: unlink() "/var/run/nginx-cache/1/e8/eabe6b94fd6201239051f424964b5e81" failed (2: No such file or directory)
    2024/08/27 15:23:10 [crit] 1081#1081: unlink() "/var/run/nginx-cache/5/1c/20b896a429016dc6062f5a1eeb0ec1c5" failed (2: No such file or directory)
    2024/08/27 16:03:47 [crit] 1081#1081: unlink() "/var/run/nginx-cache/4/79/c73f3d0487fb68b7917d010e51ba6794" failed (2: No such file or directory)
    2024/08/27 16:08:28 [crit] 1081#1081: unlink() "/var/run/nginx-cache/f/f0/7c21b1cc6bdb56452c5a2a9f8d8f2f0f" failed (2: No such file or directory)

    And lately, I've been getting an 'unable to establish connection to database' error, instead of an internal server 500 error.
    This is really impacting the performance of my websites and I'm unable to figure out why it's happening.

    I've loved WordOps since EasyEngine complicated things with Docker. . .but I don't see how I can continue using it if this keeps up 🙁

    So are you using TWO lots of page caching (Nginx + WP Rocket)..? I wouldn't do that.

    2024/07/16 18:26:26 [crit] 917#917: unlink() "/var/run/nginx-cache/0/2a/493b1eedfdb8b467e9a9c3e9410842a0" failed (2: No such file or directory)

    2024/07/21 22:58:27 [error] 26239#26239: *124672 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/www/playstoresales.com/htdocs/wp-content/cache/wp-rocket/www.playstoresales.com/app/electrodroid-pro): Failed to open directory: No such file or directory in /var/www/playstoresales.com/htdocs/wp-content/plugins/wp-rocket/inc/common/purge.php:124

      marty

      i have (had) three websites using wp-rocket for cache. and have been using fast-cgi cache for the other 4-5 (low traffic) sites I have on the server

      is that a going to have a negative impact on the server? I created the websites with wordops using the correct caching attribute/flag and never had this issue with the old Debian server that I used (debian 10, I believe)

      ever since moving to debian 12, though, I've been having this issue that seems to be following one of my websites (I think I may have zeroed in on which one). and just recently uninstall wp-rocket from that website while also using wordops to update the site to use fast-cgi instead

      I'm waiting again to see if it happens again (I generally have to wait 5-10 days before I see the error, and a quick reboot in a terminal/ssh window resolves the problem)

        Endda Ah OK - it wasn't clear this was multiple different sites. It should be OK to use both on the same server (not tried), just not two page caches for the same site. The errors possibly suggest something is purging both caches so you then get file not found type errors from Nginx or WP Rocket... is there any other plugin/script/process that may be clearing caches?

          marty i did notice that nginx helper was installed (for some reason) so I have uninstalled/deleted that plugin and now I'm not two days in a row without any new entries in error.log (thanks so much for making me double check this)

          now, it seems I'm having some strange issue with mariadb crashing every 2-3 days.
          as mentioned here - https://community.wordops.net/d/2068-mariadb-crashing-looking-for-database-optimization-help

          I saw another thread mention they were having a similar issue, but I'm not sure if their my.conf changes would be optimal for my vps (so I created a new thread)

          I'm a bit shocked to see this crash issue being reported by multiple people right now (I never had this crash on the Debian 10 server I was using for the last couple of years). same vps hardware (2cpu/2gb ram/2gb swap) so I'm curious if there's been a major change in wordops or the operating system

          either way, I'm hoping that I can get this crash issue sorted out soon

            Endda I'm a bit shocked to see this crash issue being reported by multiple people right now

            I think it's just one other person..? Which was on a low memory server - resolved by tuning memory usage.

            All it takes is a bit of bad coding in a plugin and memory or cpu usage can go crazy.

            WO sets some good basic settings when you install it based on server resources. But if you're trying to squeeze the best out of a smaller vps then you can tune things further. If it's using that much swap regularly then you definitely need to tune things and/or upgrade the memory.

            Hosted by VirtuBox