I've created a Resource Group with an App Service Linux (Production plan) and a MySQL Database.
I've uploaded and configured Wordpress on this app service. Everything was working fine but in last month I've found my web app with an error page twice.
The error page was only reporting "Server Error".
I've searched errors through logs (docker and mysql) but I did not find interesting rows. The only one was::
PHP Warning: Error while sending QUERY packet. PID=2696 in /home/site/wwwroot/wp-includes/wp-db.php on line 2030, referer: https://www.google.com/
I don't know why it is referring to google.com. Trying to find a reason for the error I've also uploaded a static HTML file and server keeps returning the error page and obviously I've tried to restart the App Service.
The only action that solved the problem was scale up to a better plan. I've investigated why and I've noticed the memory usage jumped to the max memory available even if request to the site are following the average number of requests in last month, where memory usage was quite lower. For example, 3.5GB was the memory usage when App Service was down, 500 MB is the average memory usage in past 20 days.
Anyway, the site started immediately when I scaled up the service.
Why memory started to be critical even if I did not changed anything on my web site? Is it possible tha Docker container is not working fine? Or how can I manage this problem without having my website down?