So last week we had a puzzling bug relating to PHP and it’s modules. We have the following setup on AWS:

Ext ELB -> Nginx (rate limiting, multiple SSL termination) -> internal ELB -> Apache / PHP

We have multiple stores on these apache boxes along side our admin interface and what was puzzling was we started getting 502 errors on just our admin interface as we scaled up the number of EC2 instances behind the internal ELB. After several days of tinkering and trying many different ideas. We stumbled on a blog posting (sorry I didn’t bookmark it so I can’t give credit) that talked about turning off these two settings in /etc/php.d/opcache.ini:

I don’t exactly know why this worked but it fixed our issue and I wanted to post it incase someone else was having a rough week with 502 errors.

Written by kevin