Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Issue with HTTP Client connection pool

Avatar

Level 5

Hey guys,

 

I'm gettting a connection pool error trying to initiate an HTTP Post request:

 

org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:313)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:279)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:191)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
	at org.apache.http.client.fluent.Request.internalExecute(Request.java:173)
	at org.apache.http.client.fluent.Executor.execute(Executor.java:262)
	at com.panerabread.core.services.rest.impl.HttpClientServiceImpl.executeRequest(HttpClientServiceImpl.java:86)
	at com.panerabread.core.servlets.FormServlet.sendEmail(FormServlet.java:240)
	at com.panerabread.core.servlets.FormServlet.doPost(FormServlet.java:101)

 

Where is the actual config for the pool size?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor
2 Replies

Avatar

Correct answer by
Employee Advisor

According to the javadocs a threadpool with 100 threads is used:

 

https://hc.apache.org/httpcomponents-client-4.5.x/current/fluent-hc/apidocs/

Avatar

Level 2

@jkpanera can you provide the piece of java code you're using to post request