Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Issue with HTTP Client connection pool

Avatar

Avatar
Springboard
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

107 posts

Correct Reply

2 solutions
Top badges earned
Springboard
Establish
Validate 10
Validate 1
Ignite 5
View profile

Avatar
Springboard
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

107 posts

Correct Reply

2 solutions
Top badges earned
Springboard
Establish
Validate 10
Validate 1
Ignite 5
View profile
jkpanera
Level 3

06-05-2021

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,112 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,112 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

06-05-2021

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

 

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

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 3
Level 2
maheshbabuvoma
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

3 solutions
Top badges earned
Affirm 3
Boost 5
Boost 3
Affirm 1
Boost 1
View profile

Avatar
Affirm 3
Level 2
maheshbabuvoma
Level 2

Likes

5 likes

Total Posts

7 posts

Correct Reply

3 solutions
Top badges earned
Affirm 3
Boost 5
Boost 3
Affirm 1
Boost 1
View profile
maheshbabuvoma
Level 2

13-05-2021

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