1、
If 502 occurs mainly in some post or database operations, rather than in static page operations, you can check one of the php-fpm.conf settings:
request_terminate_timeout
This value is max_execution_time, which is the execution script time of fast-cgi.
0s
This change is in the /usr/local/php/etc/php-fpm.conf file, backing up php-fpm0.conf