PHP的 - 大量发布的Apache 500内部服务器错误 [英] Php - Bulk post 500 Apache Internal Server Error

查看:198
本文介绍了PHP的 - 大量发布的Apache 500内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有哪些JSON格式只发送大量数据的脚本
邮寄。

高达10MB左右的数据(数据被放在一个平面文件)脚本的伟大工程,但
如果负载较高的I Apache的500内部服务器错误得到。

我窥探到Apache日志文件,我得到

  [星期三1月19日十七时26分41秒2011] [错误] [客户端IP]脚本头premature结束:的index.php
[星期三1月19日17点26分41秒2011] [调试] mod_deflate.c(615):客户端IP]的Zlib:COM pressed 632至385:URL的index.php

你有什么想法呢?

再见。


解决方案

  

脚本头premature结束


此消息意味着PHP脚本任何允许输出内容类型到Apache前死亡。如果您已激活它可能是你的PHP脚本的任何错误或超时ob_ *功能,请检查您的设置时间限制在PHP 参数超时。

检查以及您的异常处理输出正确​​的内容类型,如果你想输出错误信息。

要检查是否能产生影响,你必须检查超时参数和大小限制以外的所有参数。下面是其中一些:

阿帕奇:


  • LimitRequestBody

PHP:


  • 的post_max_size

  • 的upload_max_filesize

  • max_input_time设置

  • 的max_execution_time

  • ,也许memory_limit的以及

I've a script which send just a lot of data in json format by post.

Up to about 10Mb (data are put into a flat file) of data the script works great but if the load is higher I get from apache 500 Internal Server Error.

I peeped into apache log file I get

[Wed Jan 19 17:26:41 2011] [error] [client ip] Premature end of script headers: index.php
[Wed Jan 19 17:26:41 2011] [debug] mod_deflate.c(615): [client ip] Zlib: Compressed 632 to 385 : URL /index.php

Do you have any idea about it ?

Bye.

解决方案

Premature end of script headers

This message means the PHP script died before outputing any content-type to apache. If you have ob_* functions activated it could be any error on your PHP script, or a timeout, check your set-time-limit parameter in PHP for timeouts.

Check as well that your exception handling output the correct content type if you want to output an error message.

To check all parameters that can have an impact you must check the timeout parameters and the size limits ones. Here are some of them:

Apache:

  • LimitRequestBody

PHP:

  • post_max_size
  • upload_max_filesize
  • max_input_time
  • max_execution_time
  • and maybe memory_limit as well

这篇关于PHP的 - 大量发布的Apache 500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆