Thank you @Ken
Here are the troubleshooting steps we have already taken:
1. Server status: We checked both nginx and PHP status and they are running [systemctl status nginx, systemctl status php8.2-fpm]
2. After checking the error.log in the /var/log/nginx directory:
"line 582 of /theme/degrade/lib.php: call to core\output\theme_config->setting_file_serve()
* line 5341 of /lib/filelib.php: call to theme_degrade_pluginfile()
* line 44 of /pluginfile.php: call to file_pluginfile()" while reading response header from upstream, client: 10.20.163.238, server: taxacademy.ataftax.org, request: "GET /pluginfile.php/1/theme_degrade/logo_write/1751499283 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:",
host: "taxacademy.ataftax.org", referrer: "
https://taxacademy.ataftax.org/admin/search.php"
2025/07/03 08:05:34 [error] 3840#3840: *2668 FastCGI sent in stderr: "PHP message: Default exception handler: Sorry, the requested file could not be found Debug:
Error code: filenotfound
* line 2148 of /lib/filelib.php: core\exception\moodle_exception thrown
* line 1827 of /lib/classes/output/theme_config.php: call to send_file_not_found()
* line 582 of /theme/degrade/lib.php: call to core\output\theme_config->setting_file_serve()
* line 5341 of /lib/filelib.php: call to theme_degrade_pluginfile()
* line 44 of /pluginfile.php: call to file_pluginfile()" while reading response header from upstream, client: 10.20.163.238, server: taxacademy.ataftax.org, request: "GET /pluginfile.php/1/theme_degrade/logo_write/1751499283 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:""
Seeing that the error is related to the theme in use, we then chnaged the theme back to Boost and ran the tests again. The error 504 still persisted unfortunately.
3. We tested the issue with multiple networks, including enabaling and disabling VPN. The issue affects all the users in the system
4. We have not blocked traffic on the internal firewall and
WAF yet
5. We tested with different browsers and the error still persist
6. We cleared browser cache and purched cache on Moodle multiple times
7. We flushed DNS cache
8. We have some few additional plugins but most of them are not in use yet, as the site is still very new. the nginx logs shows theme related errors only, but the error still persist even with Bosst theme activated
9.We have made some few optimization on nginx configuration file and php.ini file. we checked settings suc as:
client_max_body_size 100M;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_read_timeout 60;
10. We use WAF to minitor attacks
I hope the above have provided some clarity on how the system is currently setup