Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http connection not release on 504 error #1194

Open
tltk90 opened this issue Nov 27, 2023 · 0 comments
Open

Http connection not release on 504 error #1194

tltk90 opened this issue Nov 27, 2023 · 0 comments

Comments

@tltk90
Copy link

tltk90 commented Nov 27, 2023

It seems that if an 504 error appears in the request to the wms server,
The connection pool does not release the current connection,
And so after 2 responses 504 error from the server,
The connection pool fails to lease a new connection
and the app will be stuck forever,
only restart to gwc webapps will help.

If I add the org.apache.http.impl.conn.PoolingHttpClientConnectionManager with level all to the logger config that is the log I get:

12:10:34 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection request: [route: {}->http://localhost:8888][total available: 0; route allocated: 0 of 2; total allocated: 0 of 20]
12:10:34 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection leased: [id: 0][route: {}->http://localhost:8888][total available: 0; route allocated: 1 of 2; total allocated: 1 of 20]
12:10:46 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection [id: 0][route: {}->http://localhost:8888] can be kept alive for 5.0 seconds
12:10:46 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection released: [id: 0][route: {}->http://localhost:8888][total available: 1; route allocated: 1 of 2; total allocated: 1 of 20]
12:10:46 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection request: [route: {}->http://localhost:8888][total available: 1; route allocated: 1 of 2; total allocated: 1 of 20]
12:10:46 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection leased: [id: 0][route: {}->http://localhost:8888][total available: 0; route allocated: 1 of 2; total allocated: 1 of 20]
12:10:53 WARN   [seed.SeedTask] - Seed failed at ConveyorTile[topp:states EPSG:4326 {0,0,2} image/png] after 1 of 1 attempts. Skipping and continuing with next tile. Total failure count across threads is at: 1
org.geowebcache.GeoWebCacheException: All backends (1) failed. Reason: Unexpected response code from backend: 504 for http://localhost:8888/wms?.  Last request: 'http://localhost:8888/wms?'.
        at org.geowebcache.layer.wms.WMSHttpHelper.makeRequest(WMSHttpHelper.java:154)
        at org.geowebcache.layer.wms.WMSSourceHelper.makeRequest(WMSSourceHelper.java:53)
        at org.geowebcache.layer.wms.WMSLayer.getMetatilingReponse(WMSLayer.java:371)
        at org.geowebcache.layer.wms.WMSLayer.seedTile(WMSLayer.java:303)
        at org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:141)
        at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:78)
        at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:35)
        at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:23)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:835)
12:10:53 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection request: [route: {}->http://localhost:8888][total available: 0; route allocated: 1 of 2; total allocated: 1 of 20]
12:10:53 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection leased: [id: 1][route: {}->http://localhost:8888][total available: 0; route allocated: 2 of 2; total allocated: 2 of 20]
12:11:07 WARN   [seed.SeedTask] - Seed failed at ConveyorTile[topp:states EPSG:4326 {0,3,2} image/png] after 1 of 1 attempts. Skipping and continuing with next tile. Total failure count across threads is at: 2
org.geowebcache.GeoWebCacheException: All backends (1) failed. Reason: Unexpected response code from backend: 504 for http://localhost:8888/wms?.  Last request: 'http://localhost:8888/wms?'.
        at org.geowebcache.layer.wms.WMSHttpHelper.makeRequest(WMSHttpHelper.java:154)
        at org.geowebcache.layer.wms.WMSSourceHelper.makeRequest(WMSSourceHelper.java:53)
        at org.geowebcache.layer.wms.WMSLayer.getMetatilingReponse(WMSLayer.java:371)
        at org.geowebcache.layer.wms.WMSLayer.seedTile(WMSLayer.java:303)
        at org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:141)
        at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:78)
        at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:35)
        at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:23)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:835)
12:11:07 DEBUG  [conn.PoolingHttpClientConnectionManager] - Connection request: [route: {}->http://localhost:8888][total available: 0; route allocated: 2 of 2; total allocated: 2 of 20]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant