limoncello-php / app

Quick start JSON API application
MIT License
83 stars 7 forks source link

Too many open files #34

Closed dreamsbond closed 7 years ago

dreamsbond commented 7 years ago

Hi,

I had update limoncello-php/app via composer. after completing update, i found there was an issue running composer test with:

[PHP Warning:  include(/srv/www/limoncello-php/vendor/limoncello-php/application/src/ExceptionHandlers/DefaultHandler.php): failed to open stream: Too many open files in /srv/www/limoncello-php/vendor/composer/ClassLoader.php on line 444]
[PHP Warning:  include(/srv/www/limoncello-php/vendor/limoncello-php/application/src/ExceptionHandlers/DefaultHandler.php): failed to open stream: Too many open files in /srv/www/limoncello-php/vendor/composer/ClassLoader.php on line 444]
[PHP Warning:  include(): Failed opening '/srv/www/limoncello-php/vendor/limoncello-php/application/src/ExceptionHandlers/DefaultHandler.php' for inclusion (include_path='.:/usr/share/php') in /srv/www/limoncello-php/vendor/composer/ClassLoader.php on line 444]
[PHP Warning:  Uncaught Error: Class 'Limoncello\Application\ExceptionHandlers\DefaultHandler' not found in /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php:201
Stack trace:
#0 /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php(215): Limoncello\Application\Packages\Application\Application->createExceptionHandler(Object(Limoncello\Container\Container))
#1 /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php(231): Limoncello\Application\Packages\Application\Application->Limoncello\Application\Packages\Application\{closure}(Object(ErrorException))
#2 /srv/www/limoncello-php/vendor/limoncello-php/l10n/src/Messages/FileBundleEncoder.php(101): Limoncello\Application\Packages\Application\Application->Limoncello\A in /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php on line 201]
[PHP Fatal error:  Limoncello\l10n\Messages\FileBundleEncoder::loadBundleFromFile(): Failed opening required '/srv/www/limoncello-php/resources/messages/en/Limoncello.Flute.php' (include_path='.:/usr/share/php') in /srv/www/limoncello-php/vendor/limoncello-php/l10n/src/Messages/FileBundleEncoder.php on line 101]
[PHP Warning:  include(/srv/www/limoncello-php/vendor/limoncello-php/application/src/ExceptionHandlers/DefaultHandler.php): failed to open stream: Too many open files in /srv/www/limoncello-php/vendor/composer/ClassLoader.php on line 444]
[PHP Warning:  include(/srv/www/limoncello-php/vendor/limoncello-php/application/src/ExceptionHandlers/DefaultHandler.php): failed to open stream: Too many open files in /srv/www/limoncello-php/vendor/composer/ClassLoader.php on line 444]
[PHP Warning:  include(): Failed opening '/srv/www/limoncello-php/vendor/limoncello-php/application/src/ExceptionHandlers/DefaultHandler.php' for inclusion (include_path='.:/usr/share/php') in /srv/www/limoncello-php/vendor/composer/ClassLoader.php on line 444]
[PHP Fatal error:  Uncaught Error: Class 'Limoncello\Application\ExceptionHandlers\DefaultHandler' not found in /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php:201
Stack trace:
#0 /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php(215): Limoncello\Application\Packages\Application\Application->createExceptionHandler(Object(Limoncello\Container\Container))
#1 /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php(231): Limoncello\Application\Packages\Application\Application->Limoncello\Application\Packages\Application\{closure}(Object(ErrorException))
#2 /srv/www/limoncello-php/vendor/composer/ClassLoader.php(444): Limoncello\Application\Packages\Application\Application->Limoncello\Application\Packages\Applicatio in /srv/www/limoncello-php/vendor/limoncello-php/application/src/Packages/Application/Application.php on line 201]

not sure should i ignore such warning..

neomerx commented 7 years ago

I sometimes also got such message. It means that number of open files exceeds OS limit which is on my machine is rather low (1024). In this case I just double it with $ ulimit -n 2048 which is also rather a low limit but enough for me.

dreamsbond commented 7 years ago

@neomerx yea. the 1024 was still low. 2048 works for me