A set of main station environment was built on the development and testing machine. At the beginning, it was normal and 502 was normal every time.
NGINX error log:
php-fpm.log log:
Change the php process to 1, strace -p pid -o text.txt, view the process:
dmesg View error message:
gdb View core dump:
No clear error From the source, I can only conclude that it is a memcache connection problem. I searched for the error and found that it was a problem with the memcached extension. I updated the corresponding memcached extension of php7 and returned to normal after restarting.
Recommended tutorial: "PHP7"
The above is the detailed content of What to do if regular 502 errors occur in php7 + linux?. For more information, please follow other related articles on the PHP Chinese website!