0

I have a small problem regarding HHVM. So i have installed HHVM on my mashine (Ubuntu 14.04) and its working without problems.

Now i've made some performance tests and made a test with apache bench. To get a maximum load i have testet the following settings:

ab -n 2000 -c 10 http://example.com/

After starting the bench all CPU cores go to 100% and the bench is running. After a few seconds it kills all HHVM processes and its down and i get the following messages in the HHVM log:

\nWarning: Too many open files in /var/www/xxx/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php on line 736
Finished singleJitRequest 1
Finished singleJitRequest 2
Finished singleJitRequest 3
Finished singleJitRequest 4
Finished singleJitRequest 5
\nWarning: Too many open files in /var/www/xxx/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php on line 736
\nFatal error: Class undefined: Doctrine\\DBAL\\Driver\\PDOException in /var/www/xxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 47
\nWarning: Too many open files in /var/www/xxx/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php on line 736

So its running in the open file limit and i don't know why. It's a normal HHVM + Nginx Setup all with default settings.

Does anybody know how to solve that problem or had the same problem before?

Edit: I use Port 9000 and not a unix socket.

1

What's your max open file descriptor limit set to?

It's probably too low, perhaps 1024?

Get a PID of your running HHVM process, and check with:

grep "open files" /proc/$pid/limits

To adjust this, you set your limits in /etc/security/limits.conf .

You also have a kernel-wide file descriptor limit located in the sysctl fs.file-max, but I wouldn't worry about that for now, it won't have an effect on this.

  • Ok i have set my ulimit -n to 100000 this looks better no my processes aren't killed anymore but its very slow my fpm is faster... – René Höhle Mar 31 '15 at 8:06
  • At the moment HHVM is slower then my fpm process ... – René Höhle Mar 31 '15 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.