Hvvm Unable to read pid file /var/run/hhvm/pid for any meaningful pid after reboot

  • Posted June 9, 2014

I have my server running on digital ocean with nginx and hhvm, it was working great for the last month, then i had to restart the server and going to restart the services as nginx php-fpm and hhvm i got this error:

Unable to read pid file /var/run/hhvm/pid for any meaningful pid

So i thought was a permission issue and give it the full permission doing

sudo chmod +rw /var/run/hhvm/pid and even sudo chmod -R 777 /var/run/hhvm

but it doesn’t fix this issue. Now my website is off for this reason, and unfortunately i don’t have any idea what the problem can be.

Will be really appreciated if you could direct me to fix the problem. Thanks

My OS is ubuntu 12.4


what is Hvvm?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Typical launch command:

hhvm --mode daemon -d hhvm.server.type=fastcgi -d hhvm.server.port=9000 -c /etc/hhvm/server.ini

I dug a little deeper into this issue and it turns out that the init script packaged with Fedora doesn’t exactly work (I know you’re using Ubuntu but I’d check that out). Running the /etc/init.d/hhvm stop and /etc/init.d/hhvm start both failed and the error was masked b/c I was using service command.

Worst case, try starting hhvm manually <pre> /usr/bin/hhvm --config /etc/hhvm/server.hdf --user www-data --mode daemon -vServer.Type=fastcgi -vServer.Port=9000 </pre>

I had a similar problem with Fedora 20 and HHVM. On the first initial install, everything works great. I tried restarting the service and then I got complaints about the pid. First, make sure multiple copies of hhvm aren’t running. I had to force kill them before I could move to the next step. I ended up having to manually create the directories (mkdir -p /var/run/hhvm; chown www-data:root /var/run/hhvm; chmod 755 /var/run/hhvm) since it wasn’t created on installation.