代码之家  ›  专栏  ›  技术社区  ›  quma

Spring启动-Tomcat-Apache2-HTTP 503错误-ProxyIOBufferSize

  •  0
  • quma  · 技术社区  · 5 年前

    如果浏览器/客户机上出现HTTP 503,则apache2日志文件中也会出现一个条目,如下所示:

    [Thu Mar 26 00:10:52.731383 2020] [proxy_ajp:error] [pid 16266:tid 139926293157632] [client 
    xxxx.xxxx.3.59:60869] AH00893: dialog to 127.0.0.1:9090 (localhost) failed, referer: 
    https domain
    [Thu Mar 26 00:10:57.802571 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] 
    (70014)End of file found: AH01030: ajp_ilink_receive() can't receive header
    [Thu Mar 26 00:10:57.802597 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] [client 
    xxx.xxx.3.59:60875] AH00992: ajp_read_header: ajp_ilink_receive failed, referer: 
    https domain
    [Thu Mar 26 00:10:57.802628 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] 
    (120006)APR does not understand this error code: [client xxx.xxx.3.59:60875] AH00878: read 
    response failed from 127.0.0.1:9090 (localhost), referer: https domain
    

    我发现了这个线索:

    We did some more investigation and found that the Apache setting that enables packets > 8192 
    (ProxyIOBufferSize 65536) was not going into effect because it was wrapped in an <IfModule 
    ... > condition. (The module is loaded but we are investigating why the condition isn't 
    satisfied.) Tomcat 8.5 worked because it never sent packets larger than 8192, even though it 
    was allowed to, Tomcat 9 is sending bigger packets as it is configured to. With 
    ProxyIOBufferSize outside of the conditional, it is now working as expected.
    

    0 回复  |  直到 5 年前
        1
  •  0
  •   Nilanka Manoj    5 年前

    你可以改变 ProxyIOBufferSize 指令 模块模块代理 裁判: https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyiobuffersize

    编辑的代理部分 :

    <Proxy>
        ProxyIOBufferSize 65536
    </Proxy>