I’m running compojure on Heroku. They have a limit of a 100 threads per process. So when I go over that limit, I get: java.lang.OutOfMemoryError: unable to create new native thread.
Compojure is using the jetty ring adapter. Is there away of configuring the the server to only accept a hundred threads to the servlet at a time?
I’m running compojure on Heroku. They have a limit of a 100 threads per
Share
The solution comes from Chris Perkins over at the compojure google group.
This initializes a QueuedThreadPool (with a concurrent limit of five threads) to the jetty instance, before it starts.