如何解决传输已关闭的未完成的读取数据或服务器的空回复?

时间:2010-04-15 20:13:07

标签: php apache curl

最近,如果没有任何网站代码更改,我们的一些动态PHP页面要么只是部分渲染,要么根本不渲染。

当页面根本不呈现时,当我运行curl时,这就是我所看到的:

$ curl -lv http://example.com/create_ad.php
* About to connect() to example.com port 80
*   Trying 66.777.888.999... * connected
* Connected to example.com (66.777.888.999) port 80
> GET /mypage.php HTTP/1.1
User-Agent: curl/7.13.2 (i386-pc-linux-gnu) libcurl/7.13.2 OpenSSL/0.9.7e zlib/1                                                         .2.2 libidn/0.5.13
Host: example.com
Pragma: no-cache
Accept: */*

* Empty reply from server
* Connection #0 to host example.com left intact
curl: (52) Empty reply from server
* Closing connection #0

在部分渲染的页面上,当我运行curl时,我看到了:

$ curl -lv http://example.com/anotherpage.php
* About to connect() to example.com port 80
*   Trying 66.777.888.999... * connected
* Connected to example.com (66.777.888.999) port 80
> GET /anotherpage.php HTTP/1.1
User-Agent: curl/7.13.2 (i386-pc-linux-gnu) libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Host: example.com
Pragma: no-cache
Accept: */*

< HTTP/1.1 200 OK
< Date: Thu, 15 Apr 2010 20:03:49 GMT
< Server: Apache/1.3.39 (Unix) mod_ssl/2.8.30 OpenSSL/0.9.8d
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html
[PARTIALLY RENDERED & MANGLED HTML HERE]
* transfer closed with outstanding read data remaining
* Closing connection #0
curl: (18) transfer closed with outstanding read data remaining

PHP错误日志中没有错误。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

问题是由于日志文件未被滚动和存档而导致apache日志文件增长到2 GB以上。