douzhan1868
douzhan1868
2010-04-15 20:13

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

已采纳

Recently and without any website code changes, a few of our dynamic PHP pages are either only partially rendering or not rendering at all.

When the page won't render at all, and when I run curl, this is what I see:

$ 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

And on partially rendered pages, when I run curl, I see this:

$ 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

No errors in PHP error logs. Any ideas?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • duanbianweng5353 duanbianweng5353 11年前

    The problem was caused by apache log files growing to over 2 GB because the log files were not being rolled and archived.

    点赞 评论 复制链接分享