500服务器错误:脚本头premature结束: [英] 500 Server error: Premature end of script headers:
问题描述
我在PHP的一个网站,与Solr的指数化服务器工作的基础上,codeIgniter。
I have a website in php that works with a solr indexation server, based on CodeIgniter.
我们得到了很多新的内容,所以我们刷新数据库,而不得不重新索引内容(约168000元)。我由500片创建一个脚本来索引的内容 - 当脚本结束,我们推出下一分度
We got a lot of new content, so we flushed the database, and had to reindex the content (about 168,000 elements). I created a script to index the contents by slices of 500 – when the script finishes, we launch the next indexing.
它完美对我的本地测试环境,但对生产我得到这个500错误:
It works perfectly on my local test environment, but on production I get this 500 error:
[Thu Dec 02 ...] [error] [client IP] Premature end of script headers: index.php
有绝对没有在我的php.log,只是在Apache的error_log返回它。我已经看到了发生在该网站的其他页面一次或两次,但它是这个索引中。
There is absolutely nothing in my php.log, just the apache error_log that returns it. I've seen it happen on other pages of the website once or twice, but it was during this indexing.
任何想法?
推荐答案
此错误通常是(有时)造成的<一个FastCGI的设置href=\"http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidiotimeout\"><$c$c>FcgidIOTimeout$c$c>指令(旧名: IPCCommTimeout
)。
This error is usually (sometimes) caused by the FastCGI setup of the FcgidIOTimeout
directive (old name: IPCCommTimeout
).
这是对IO超时的秒数,默认为40秒。超时意味着
That is the number of seconds for IO timeout, default is 40 seconds. Timeout means that
的FastCGI应用程序必须开始产生这段时间内响应,增加必要的这个指令来处理这需要相对较长的时间来作出反应周期中的应用。的
您可以尝试去解决它把这个放入你的vhost.conf:
You can try to solve it putting this into your vhost.conf:
<IfModule mod_fcgid.c>
# 5 minutes for IO timeout, default is 40 seconds
FcgidIOTimeout 300
</IfModule>
您可以增加它,你需要再恢复原值一次重新索引过程完成。
You can increase it as you need and then restore the original value once the reindexing process is complete.
这篇关于500服务器错误:脚本头premature结束:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!