I expected the thread pool to be pegged at 100 threads, but watching in
visual vm showed 24 threads (default). Poking around the object structure
in the debugger, I found nested deep under the flowmaterializer was a
maxsize of 64 (also default).
-r
On Thursday, January 15, 2015 at 5:34:05 PM UTC-8, Randy Fox wrote:
>
> I am trying to assign a dispatcher to be used for my http server (using
> the new Akka HTTP Server) and can’t get it to honor my pool size settings.
> Logs show it is using the dispatcher, but visualvm shows it is not using
> the core pool size settings. Loos like it might be using the defaults for
> a thread-pool-executor.
>
>
> All I did was modify the example:
>
> 1. import akka.http.Http
> 2. import akka.stream.FlowMaterializer
> 3.
> 4. implicit val system = ActorSystem()
> 5. implicit val materializer = FlowMaterializer(*MaterializerSettings*(
> *system*).withDispatcher(*“myhttpRequestHandler.dispatcher"*))
> 6.
> 7. val serverBinding = Http(system).bind(interface = "localhost", port
> = 8080)
> 8. serverBinding.connections.foreach { connection => // foreach
> materializes the source
> 9. println("Accepted new connection from " +
> connection.remoteAddress)
> 10. }
> 11. …
>
> myhttpRequestHandler {
>
> dispatcher {
>
> type = Dispatcher
>
> executor = *"thread-pool-executor"*
>
> name = httprequesthandler-dispatcher
>
> thread-pool-executor {
>
> core-pool-size-min = 100
>
> core-pool-size-factor = 2.0
>
> core-pool-size-max = 100
>
> }
>
> throughput = 5
>
> }
>
> }
>
> [INFO] [2015-01-15 17:24:27,516] [DUDE-myhttpRequestHandler.dispatcher-79]
> HttpRequestHandler(akka://DUDE): Accepted new connection from /
> 127.0.0.1:54046
>
> What am I missing?
>
> Thanks,
>
> Randy Fox
>
--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.