PHP致命错误:Codeigniter:无法创建新线程;可用内存不足
我不断在错误日志中收到这些错误消息:
PHP Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'PDO Connection Error: SQLSTATE[00000] [1135] Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
PHP Fatal error: Class 'Doctrine_Connection_Exception' not found in /var/www/vhosts/domain.com/httpdocs/application/plugins/doctrine/lib/Doctrine/Connection.php on line 474
PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/domain.com/httpdocs/system/codeigniter/CodeIgniter.php' (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/index.php on line 140
PHP Warning: require_once(/var/www/vhosts/domain.com/httpdocs/system/codeigniter/CodeIgniter.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: Too many open files in system in /var/www/vhosts/domain.com/httpdocs/index.php on line 140, referer: ''
我不知道这些问题是否彼此相关。只是想我会提到它。
每次发生此错误之一时,我网站上的相应页面都不会加载。请帮我解码这个问题。
更多信息 - 该网站由 Media Temple 的 DV 计划托管。
提前致谢, 卡玛莱什
I keep getting these error messages in my error log:
PHP Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'PDO Connection Error: SQLSTATE[00000] [1135] Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
PHP Fatal error: Class 'Doctrine_Connection_Exception' not found in /var/www/vhosts/domain.com/httpdocs/application/plugins/doctrine/lib/Doctrine/Connection.php on line 474
PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/domain.com/httpdocs/system/codeigniter/CodeIgniter.php' (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/index.php on line 140
PHP Warning: require_once(/var/www/vhosts/domain.com/httpdocs/system/codeigniter/CodeIgniter.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: Too many open files in system in /var/www/vhosts/domain.com/httpdocs/index.php on line 140, referer: ''
I do not know if these issues are related to each other or not. Just thought I'd mention it.
Everytime one of this error occurs, the corresponding page on my site does not load. Please help me decode the issue.
Some more information - The site is hosted on Media temple's DV plan.
Thanks in advance,
Kamalesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于第一个错误:您的 SQL 服务器内存不足。 PHP 无法修复此问题,您需要(让某人)配置您的 SQL 服务器,以便它拥有更多可用内存 - 或者 - 配置文件并优化您的查询(如果可能)。
第二个错误:某些PHP文件找不到包含Doctrine_Connection_Exception的文件,从第一个错误我可以看到它确实存在并且有时可以找到,我猜这是你的包含路径的问题,
For the first error: Your SQL server is out of memory. This isn't fixable by PHP, you need to (let someone) configure your SQL server so it has more available memory -OR- profile and optimize your queries (if possible).
The second error: Some PHP file can't find the file that contains the Doctrine_Connection_Exception, from the first error I can see that it does exists and sometimes can be found, I'm guessing it's a problem with your include path,
感谢您的建议。我想我已经找到问题所在了。
我们最近在 httpd.conf 中打开了“keep_alive”。将其关闭后,错误就不再出现。
Thanks for your suggestions. I think I have figured out the problem.
We switched on 'keep_alive' in httpd.conf recently. The errors have stopped propping up on switching it off.