We have a Web Feature Server (NG) store configured and pointing to an external API, from which we get few layers to our Geoserver. Lately we've started to see timeouts on the requests done to the mentioned API:
31 Jan 14:54:44 ERROR [renderer.lite] - org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
java.lang.RuntimeException: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:175)
at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:47)
at org.geoserver.feature.RetypingFeatureCollection.features(RetypingFeatureCollection.java:31)
...
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:316)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:282)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
...
Capabilities document from the API is gotten with HTTPS. When executing some layer preview request manually in browser, it works fine.
We've tried to modify connection related settings of the store, e.g.:
WFSDataStoreFactory:MAX_CONNECTION_POOL_SIZE and Connection and read timeout but they do not seem to have any effect.
Parameters on Dockerfile of the Geoserver are quite vanilla:
FROM kartoza/geoserver:2.23.0
ENV HTTP_SCHEME=https
ENV EXISTING_DATA_DIR=true
We've also checked the Tomcat default thread pool size, and it seems to be quite high (150), so most likely not the reason, or does not need to be changed.
Has anyone run into the same issue with Kartoza Geoserver? What parameters are affecting the Tomcat HTTP connection pool size in Kartoza Geoserver, that we could try?
Thanks!