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

June 9, 2014 3.9k views
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
1 comment
2 Answers
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.
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
/usr/bin/hhvm --config /etc/hhvm/server.hdf --user www-data --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
Have another answer? Share your knowledge.