我正在寻找有关为什么大于 128K 的邮件请求因返回的 500 或 404 而死亡的线索。
php脚本包含与此部分类似的内容
$arContext['http']['timeout'] = 60;
$context = stream_context_create($arContext);
$FileContents = file_get_contents('php://input', 0, $context);
syslog(LOG_INFO, "File length = " . strlen($FileContents);
服务器端:
post_max_size = 8M
memory_limit = 32M
syslog显示这些失败帖子的文件长度为131702。
此时,这似乎只是卫星连接的问题,但不确定如何解决这个问题。
来自服务器端的Wireshark包括:
POST /Farms/somewhere.php?id=lalala HTTP/1.1
Host: nowhere.net
Content-Length: 96
Expect: 100-continue
Connection: Keep-Alive
.G.c.!.......&.>...&..K..-.)..^B?.(..4XH..veU..kU..w...I..Xr.&C...+^H...`.............x..C=.2...HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Date: Fri, 27 May 2016 22:32:39 GMT
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
X-Powered-By: PHP/5.5.30
Cache-Control: no-transform
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=Windows-1252
10
."5.......E..>..
0
POST /Farms/somewhere.php?id=lalala HTTP/1.1
Host: nowhere.net
Content-Length: 1745376
Expect: 100-continue
HTTP/1.1 100 Continue
.G.c.!.......&.>.--->data-->Y.I*#WHTTP/1.1 500 Internal Server Error
Date: Fri, 27 May 2016 22:32:41 GMT
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
Content-Length: 798
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
webmaster@nowhere.net and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<p>Additionally, a 500 Internal Server Error
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at nowhere.net Port 80</address>
</body></html>
apache错误日志显示
[Sat May 28 10:47:53 2016] [error] [client nn.nn.176.108] Handler for (null) returned invalid result code 70008
[Sat May 28 10:47:53 2016] [error] [client nn.nn.176.108] File does not exist: /home/somewhere/public_html/500.shtml
似乎H___net正在标题中插入Connection:Keep-Alive。