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.

René Höhle
  • 1,438
  • 3
  • 17
  • 26

1 Answers1

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.

trevorj
  • 56
  • 4