PHP-FPM and Nginx: 502 Bad Gateway

后端 未结 15 1892
闹比i
闹比i 2021-01-29 18:35

Configuration

  • Ubuntu Server 11.10 64 bit
  • Amazon AWS, Ec2, hosted on the cloud
  • t1.micro instance

Before I write an

15条回答
  •  青春惊慌失措
    2021-01-29 19:01

    For anyone else struggling to get to the bottom of this, I tried adjusting timeouts as suggested as I didn't want to stop using Unix sockets...after lots of troubleshooting and not much to go on I found that this issue was being caused by the APC extension that I'd enabled in php-fpm a few months back. Disabling this extension resolved the intermittent 502 errors, easiest way to do this was by commenting out the following line :

    ;extension = apc.so
    

    This did the trick for me!

提交回复
热议问题