简体   繁体   中英

Php - Bulk post 500 Apache Internal Server Error

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM