Stale connection detected and then closed

I have an http 401 error when calling an endpoint (deployed in wildfly) that require more than 5 minutes to process the request and it seems like the server side close the connection after exactly 5 minutes.

The trace execution is as follow:

2024-06-27 16:54:50,339 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-51) Connection request: [route: {s}->https://rct.server.com][total kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 30]
2024-06-27 16:54:50,339 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-51) Connection leased: [id: 0][route: {s}->https://rct.server.com][total kept alive: 0; route allocated: 1 of 10; total allocated: 1 of 30]
2024-06-27 16:54:50,339 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-51) Stale connection check
2024-06-27 16:54:50,342 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-51) Attempt 1 to execute request
2024-06-27 16:54:50,342 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (pool-threads-worker-http task-51) Sending request: GET /auth/realms/server/protocol/openid-connect/userinfo HTTP/1.1
2024-06-27 16:54:50,390 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (pool-threads-worker-http task-51) Receiving response: HTTP/1.1 200 OK
2024-06-27 16:54:50,391 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-51) Connection can be kept alive indefinitely
2024-06-27 16:54:50,407 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-51) Connection [id: 0][route: {s}->https://rct.server.com] can be kept alive indefinitely
2024-06-27 16:54:50,407 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-51) Connection released: [id: 0][route: {s}->https://rct.server.com][total kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 30]
2024-06-27 16:54:53,389 INFO  [com.server.PositionsResource] (pool-threads-worker-http task-51) Begin Server createHttp401Error...

2024-06-27 16:59:51,529 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-54) Connection request: [route: {s}->https://rct.server.com][total kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 30]
2024-06-27 16:59:51,530 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-54) Connection leased: [id: 0][route: {s}->https://rct.server.com][total kept alive: 0; route allocated: 1 of 10; total allocated: 1 of 30]
2024-06-27 16:59:51,530 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-54) Stale connection check
2024-06-27 16:59:51,537 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-54) Stale connection detected
2024-06-27 16:59:51,537 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (pool-threads-worker-http task-54) Connection 0.0.0.0:30122<->10.181.72.28:443 closed
2024-06-27 16:59:51,555 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-54) Attempt 1 to execute request
2024-06-27 16:59:51,555 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (pool-threads-worker-http task-54) Sending request: GET /auth/realms/server/protocol/openid-connect/userinfo HTTP/1.1
2024-06-27 16:59:51,569 DEBUG [org.apache.http.impl.conn.DefaultClientConnection] (pool-threads-worker-http task-54) Receiving response: HTTP/1.1 401 Unauthorized
2024-06-27 16:59:51,569 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-54) Connection can be kept alive indefinitely
2024-06-27 16:59:51,570 DEBUG [org.apache.http.impl.client.DefaultHttpClient] (pool-threads-worker-http task-54) rct.server.com:443 requested authentication
2024-06-27 16:59:51,571 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-54) Connection [id: 0][route: {s}->https://rct.server.com] can be kept alive indefinitely
2024-06-27 16:59:51,572 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] (pool-threads-worker-http task-54) Connection released: [id: 0][route: {s}->https://rct.server.com][total kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 30]

Is there a way to fix this 401 http exception and make the connection still alive till the process ends?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật