簡體   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