Hi

I'm trying to use the akka-http client *outside a flow, just as http 
client.*
I've an actor :

val poolConfig = ConnectionPoolSettings(100, 0, 128, 20, 100.second, 
ClientConnectionSettings(context.system))
val connectionPool = Http().cachedHostConnectionPool[NetworkResponse](
"adfonic.net", settings = poolConfig, log = adapter)

override def receive: Receive = {
 case req : NetworkRequest =>
 val future : Future[NetworkResponse] = Source.single(req)
.log("Start Http")
.map(req => (HttpRequest(HttpMethods.GET, Uri(req.url)), req))
.log("Map to httpRequest")
.map(httpReq => httpReq._1 -> (httpReq._2.id, httpReq._2.start))
.log("Map to request")
.via(connectionPool)
.log("after connection pool")
.map(r => (r._1.get.entity.dataBytes.runWith(Sink.head), r._2))
.log("after reading response")
.mapAsync(10)(r => r._1.map(bytes => NetworkResponse(r._2._1, r._2._2, 
bytes.decodeString("UTF-8"))))
.log("after map async")
.runWith(Sink.head)
future pipeTo sender
}

So very simple I get a request create a source and make a limited flow to 
make the query.
The result future is piped in another actor
As you can see I've try to play with the ConnectionPoolSetting

Now the actor that  get this future extract the content of the http as futur

val future = (httpClientActor ? req).mapTo[NetworkResponse]
httpContent pipeTo httpContentActor

All is working perfect except than after a limited number of request 
(fixed) all is stopping I get this from the pool

DEBUG] [02/02/2016 11:21:31.089] [inneractive-akka.actor.default-dispatcher-
12] [akka.stream.Log(akka://inneractive/user/StreamSupervisor-0)] [Map to 
httpRequest] Upstream finished.
[DEBUG] [02/02/2016 11:21:31.089] [inneractive-akka.actor.default-dispatcher
-12] [akka.stream.Log(akka://inneractive/user/StreamSupervisor-0)] [Map to 
request] Element: 
(HttpRequest(HttpMethod(GET),http://adfonic.net/,List(),HttpEntity.Strict(none/none,ByteString()),HttpProtocol(HTTP/1.1)),(2,1454404891086))
[DEBUG] [02/02/2016 11:21:31.089] [inneractive-akka.actor.default-dispatcher
-12] [akka.stream.Log(akka://inneractive/user/StreamSupervisor-0)] [Map to 
request] Upstream finished.
[DEBUG] [02/02/2016 11:21:31.092] [inneractive-akka.actor.default-dispatcher
-5] [akka://inneractive/system/IO-TCP/selectors/$a/168] Attempting 
connection to [adfonic.net/54.83.33.50:80]
[DEBUG] [02/02/2016 11:21:31.092] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/system/IO-TCP/selectors/$a/169] Attempting 
connection to [adfonic.net/54.83.33.50:80]
[DEBUG] [02/02/2016 11:21:31.224] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/system/IO-TCP/selectors/$a/168] Connection 
established to [adfonic.net/54.83.33.50:80]
[DEBUG] [02/02/2016 11:21:31.227] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/system/IO-TCP/selectors/$a/169] Connection 
established to [adfonic.net/54.83.33.50:80]
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-4] [akka://inneractive/user/SlotProcessor-42] Slot 42 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/user/SlotProcessor-37] Slot 37 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/user/SlotProcessor-38] Slot 38 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-4] [akka://inneractive/user/SlotProcessor-39] Slot 39 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/user/SlotProcessor-36] Slot 36 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-13] [akka://inneractive/user/SlotProcessor-34] Slot 34 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.943] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/user/SlotProcessor-41] Slot 41 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.944] [inneractive-akka.actor.default-dispatcher
-12] [akka://inneractive/user/SlotProcessor-40] Slot 40 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.944] [inneractive-akka.actor.default-dispatcher
-12] [akka://inneractive/user/SlotProcessor-43] Slot 43 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:34.944] [inneractive-akka.actor.default-dispatcher
-13] [akka://inneractive/user/SlotProcessor-35] Slot 35 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.299] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/user/SlotProcessor-45] Slot 45 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.299] [inneractive-akka.actor.default-dispatcher
-2] [akka://inneractive/user/SlotProcessor-46] Slot 46 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.299] [inneractive-akka.actor.default-dispatcher
-9] [akka://inneractive/user/SlotProcessor-50] Slot 50 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.299] [inneractive-akka.actor.default-dispatcher
-10] [akka://inneractive/user/SlotProcessor-51] Slot 51 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.299] [inneractive-akka.actor.default-dispatcher
-10] [akka://inneractive/user/SlotProcessor-52] Slot 52 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.300] [inneractive-akka.actor.default-dispatcher
-6] [akka://inneractive/user/SlotProcessor-49] Slot 49 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.300] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/user/SlotProcessor-53] Slot 53 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.300] [inneractive-akka.actor.default-dispatcher
-9] [akka://inneractive/user/SlotProcessor-44] Slot 44 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.301] [inneractive-akka.actor.default-dispatcher
-14] [akka://inneractive/user/SlotProcessor-48] Slot 48 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:41.301] [inneractive-akka.actor.default-dispatcher
-5] [akka://inneractive/user/SlotProcessor-47] Slot 47 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.657] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/user/SlotProcessor-62] Slot 62 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.658] [inneractive-akka.actor.default-dispatcher
-5] [akka://inneractive/user/SlotProcessor-63] Slot 63 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.658] [inneractive-akka.actor.default-dispatcher
-4] [akka://inneractive/user/SlotProcessor-55] Slot 55 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.658] [inneractive-akka.actor.default-dispatcher
-5] [akka://inneractive/user/SlotProcessor-57] Slot 57 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.658] [inneractive-akka.actor.default-dispatcher
-11] [akka://inneractive/user/SlotProcessor-60] Slot 60 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.658] [inneractive-akka.actor.default-dispatcher
-5] [akka://inneractive/user/SlotProcessor-56] Slot 56 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.658] [inneractive-akka.actor.default-dispatcher
-11] [akka://inneractive/user/SlotProcessor-54] Slot 54 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.661] [inneractive-akka.actor.default-dispatcher
-10] [akka://inneractive/user/SlotProcessor-61] Slot 61 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.663] [inneractive-akka.actor.default-dispatcher
-5] [akka://inneractive/user/SlotProcessor-58] Slot 58 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:47.663] [inneractive-akka.actor.default-dispatcher
-14] [akka://inneractive/user/SlotProcessor-59] Slot 59 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:54.019] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/user/SlotProcessor-68] Slot 68 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:54.019] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/user/SlotProcessor-64] Slot 64 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:54.019] [inneractive-akka.actor.default-dispatcher
-7] [akka://inneractive/user/SlotProcessor-65] Slot 65 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:54.019] [inneractive-akka.actor.default-dispatcher
-4] [akka://inneractive/user/SlotProcessor-66] Slot 66 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:54.023] [inneractive-akka.actor.default-dispatcher
-12] [akka://inneractive/user/SlotProcessor-69] Slot 69 disconnected after 
regular connection close
[DEBUG] [02/02/2016 11:21:54.023] [inneractive-akka.actor.default-dispatcher
-15] [akka://inneractive/user/SlotProcessor-67] Slot 67 disconnected after 
regular connection close


It seems to me that I reach some limit like an exhausted resource from the 
pool.
>From there nothing working more until restart the application
Please some help

Thanks

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to