Akka-Http The Connection Pool Gets Stuck sometimes

132 views
Skip to first unread message

Eli Orzitzer

unread,
Sep 22, 2016, 9:10:47 AM9/22/16
to Akka User List
Hi,

I have a stream that periodically does http outgoing request using the super pool.

It seems that if I set the time between the http requests to be 30 seconds, the http is stuck (verified using log before the http the after, the one after never gets printed)

Also, if there is a failure during the http and I immediately retry the request (using Retry from contrib) the http is stuck again. For this scenario I can post a simple reproducer.

For both cases sending the request only after 40 seconds solves the issue.


Is this a bug or am I missing something?

Thanks!
Eli

Viktor Klang

unread,
Sep 22, 2016, 10:37:40 AM9/22/16
to Akka User List

Are you forgetting to consume the request body?

--
Cheers,


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Eli Orzitzer

unread,
Sep 22, 2016, 11:20:00 AM9/22/16
to Akka User List
No, I do consume the databytes.


On Thursday, September 22, 2016 at 5:37:40 PM UTC+3, √ wrote:

Are you forgetting to consume the request body?

--
Cheers,

On Sep 22, 2016 15:10, "'Eli Orzitzer' via Akka User List" <akka...@googlegroups.com> wrote:
Hi,

I have a stream that periodically does http outgoing request using the super pool.

It seems that if I set the time between the http requests to be 30 seconds, the http is stuck (verified using log before the http the after, the one after never gets printed)

Also, if there is a failure during the http and I immediately retry the request (using Retry from contrib) the http is stuck again. For this scenario I can post a simple reproducer.

For both cases sending the request only after 40 seconds solves the issue.


Is this a bug or am I missing something?

Thanks!
Eli

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.

Eli Orzitzer

unread,
Sep 23, 2016, 3:52:21 AM9/23/16
to Akka User List
I am the client not the server must I also consume the request body? the request is: val request = HttpRequest(uri = ...)

Nevertheless, I added "request.entity.dataBytes.runWith(Sink.ignore)" after creating the request and it's the same. The error in the logs is:

ERROR a.h.i.engine.client.PoolMasterActor - connection pool for PoolGateway(hcps = HostConnectionPoolSetup(myhost,80,ConnectionPoolSetup(ConnectionPoolSettings(10,0,5,128,1,30 seconds,ClientConnectionSettings(Some(User-Agent: AkkaHttpDeadlock akka-http/2.4.10),10 seconds,1 minute,512,<function0>,List(),ParserSettings(2048,16,64,64,8192,64,377487360,256,1048576,Strict,RFC6265,true,Full,Error,Map(If-Range -> 0, If-Modified-Since -> 0, If-Unmodified-Since -> 0, default -> 12, Content-MD5 -> 0, Date -> 0, If-Match -> 0, If-None-Match -> 0, User-Agent -> 32),false,<function1>,<function1>,<function2>))),akka.http.scaladsl.HttpConnectionContext$@5837a0d8,akka.event.BusLogging@2dfcb675))) has shut down unexpectedly

thanks!
Eli

Viktor Klang

unread,
Sep 23, 2016, 4:02:46 AM9/23/16
to Akka User List

I assume that if you are the client, you have to consume the response body.

--
Cheers,


To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.

Eli Orzitzer

unread,
Sep 25, 2016, 4:53:17 AM9/25/16
to Akka User List
Thank for your response!

Maybe I wasn't clear before I do consume the response body. After your comment I also added consuming the request body which didn't help.
Reply all
Reply to author
Forward
0 new messages