0
votes

is about a week I work for an application and now, yesterday i receive this error and than so suddnly has disappeared and I continued to work! now i receive again this error but without any change! how can i solve it?

thanks


Warning: include_once(/www/zendsvr/htdocs/TassiWeb/application/controllers/LoginController.php) [function.include-once]: failed to open stream: Too many open files in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344

Warning: include_once() [function.include]: Failed opening '/www/zendsvr/htdocs/TassiWeb/application/controllers/LoginController.php' for inclusion (include_path='/www/zendsvr/htdocs/TassiWeb/application/../library:/www/zendsvr/htdocs/TassiWeb/library:.:/usr/local/zendsvr/share/ZendFramework/library:/usr/local/zendsvr/share/pear') in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344

Warning: include_once(/www/zendsvr/htdocs/TassiWeb/application/controllers/ErrorController.php) [function.include-once]: failed to open stream: Too many open files in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344

Warning: include_once() [function.include]: Failed opening '/www/zendsvr/htdocs/TassiWeb/application/controllers/ErrorController.php' for inclusion (include_path='/www/zendsvr/htdocs/TassiWeb/application/../library:/www/zendsvr/htdocs/TassiWeb/library:.:/usr/local/zendsvr/share/ZendFramework/library:/usr/local/zendsvr/share/pear') in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 344

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller class ("ErrorController")' in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php:352 Stack trace: /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php(262): Zend_Controller_Dispatcher_Standard->loadClass('ErrorController') /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) /usr/local/zendsvr/share/ZendFramework/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() /usr/local/zendsvr/share/ZendFramework/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() /www/zendsvr/htdocs/TassiWeb/public/index.php(26): Zend_Application->run() {main} thrown in /usr/local/zendsvr/share/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php on line 352

2

2 Answers

2
votes

Zend needs a lot of files open. But the 'too many open files' issue is connected with recursion; particularly a loop of files where A includes B includes C includes A (for instance.)

With Zend you shouldn't need to manually include files for the most part, since it uses auto-loading. In that week's time I'm thinking you may have introduced an accidental recursion.

Remove that recursion (or make sure the includes are include_once/require_once) and you will address the issue.

0
votes

I had a similar 'too many files' open error and it ended up being that I was extending the wrong Bootstrap class in my module. I was using Zend_Application_Bootstrap_Bootstrap instead of Zend_Application_Module_Bootstrap. So check if you have more than one implementation of Zend_Application_Bootstrap_Bootstrap. Hope that applies to your situation.