繁体   English   中英

502 代理 | 谁是 Wildfly 或 Spring Boot 或 Httpd 的罪魁祸首? | 来自上游服务器的无效响应

[英]502 Proxy | Who is culprit Wildfly or Spring Boot or Httpd? | Invalid response from an upstream server

我们不确定它是 Wildfly Server、Spring Boot app、HTTPD 还是其他?

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>

<head>
    <title>502 Proxy Error</title>
</head>

<body>
    <h1>Proxy Error</h1>
    <p>The proxy server received an invalid
        response from an upstream server.<br />
The proxy server could not handle the request
        <em><a href="/terp-offerings-rest-0.0.1-SNAPSHOT-wildfly10/offerings/all">GET&nbsp;/terp-offerings-rest-0.0.1-SNAPSHOT-wildfly10/offerings/all</a></em>.
        <p>
            Reason: <strong>Error reading from remote server</strong></p>
    </p>
</body>

</html>

请求在 2 分钟内尝试从数据库获取响应,但在 1 分钟内客户端收到代理错误。

在 Spring Boot 中,我做了以下操作:

@GetMapping("/offerings/all")
@Transactional(timeout = 600000)
public List<XxtoneOfferingsV> getAllOfferings(){

spring.mvc.async.request-timeout=600000

但同样的错误是徒劳的。

以下我在 wildfly 中尝试过:

Profile -> servergroup -> Undertow -> Server -> AJP/HTTP/HTTPS (Changed norequesttimeout to 600000 and readtimeout to 600000

什么都没有....

除了上述设置

在 HTTPD.CONF 中添加了以下内容

Timeout 300
ProxyTimeout 300
ProxyBadHeader Ignore 

它成功地工作了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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