Since moving to Tencent Cloud, every WordPress upgrade has been fraught with fear. The upgrade process is not smooth and has failed several times. There is no 502 error again. The foreground and background are all 502 errors.
After the Tencent Cloud VPS is restarted, the blog home page can be refreshed, and the internal page is still 502.
Through this article《 Frequent 502 error in WordPress/502 error reported in background problem solving and troubleshooting 》A solution was found.
Causes
Install two cache plug-ins Memcached and OPcache. The problem is caused by the OPcache cache.
- Memcached is a high-performance distributed memory object caching system for dynamic Web applications to reduce database load. It reduces the number of times to read the database by caching data and objects in memory, thus providing dynamic, database driven website speed.
- OPcache is a closed source but free PHP optimization acceleration component developed by Zend.
terms of settlement
Uninstall the OPcache cache plug-in.
The server environment is built with LNMP, and the command is executed:
Cd/root/lnmp1.9 (the version number needs to be modified according to the installation)
./addons.sh uninstall opcache
Press any key to continue after the prompt is as follows:
You will uninstall opcache…
Press any key to start…or Press Ctrl+c to cancel
Uninstall succeeded.
Restarting php-fpm……
Gracefully shutting down php-fpm . done
Starting php-fpm done
Uninstall Opcache completed.
After refreshing the blog, you will be prompted to upgrade the database. Click OK to open the blog successfully.