wordpressnginxhhvmwebminvirtualmin

HHVM "Crashing" 502 Bad Gateway Error


My Setup

I'm running an AWS EC2 T2 Medium Instance with Webmin / Virtualmin atop NGinx, Reddis and HHVM (called web-server-1). It's connected to a separate AWS EC2 T2 Large Instance that runs MySQL (called database-server-1). Web-server-1 operates about 25 WordPress websites.

The Problem

On web-server-1 HHVM recently started "crashing" multiple times a day at seemingly random intervals. When HHVM stops operating correctly any websites I visit display 502 errors. The only thing that resolves it is restarting HHVM.

What I've Tried

I have New Relic installed on web-server-1. So I looked at the CPU and RAM usage at the times of the "crash" I don't see higher than normal usage of those resources - which would indicate to me there is a memory leak or a runaway script.

After looking through forums here I see that many others (https://github.com/facebook/hhvm/issues/3876) are experiencing this issue and that it was confirmed as a bug but I'm not sure where to go from here.

Thank you all for your time and assistance, I hope this is helpful to others!

HHVM Error Log

https://gist.github.com/s3w47m88/fac1e0cbf4ae5846fbd2


Solution

  • Increasing hhvm.jit_a_size to 128 MB fixed the issue.