<@U0BN9C0HM> not out of the box. We don't provide ...
# http4k
d
@krtko not out of the box. We don't provide an API to do this because the options are to many and vary across the backends. But we do expect people to want to tweak the server settings, so we provide the ServerConfig interface (which gives you the to server extension function). You should copy the default version for Apache from our source and modify as required. The code to convert the HttpHandler should be reusable from our code (but let us know if it's not good enough/requires loads of duplication).
k
Ok thank you. Do you think switching to jetty or undertow would help resolve the issue or help limit thread usage? Unfortunately I'm on Heroku and it has a very strict process limits.
d
Tbh I don't know - alternatively maybe investigate if is there a way to set up Heroku to automatically spin up new dynos based on load levels?
k
Heroku doesn't have great auto scaling features. The server can easily use more threads than their limit set at 512 for 1gb of memory
The server consumes about 700~ mbs of memory when it hits the limit
d
That seems like a lot of memory. Can I ask what the app is doing? We generally see much lower memory for our services (anything from 50-250mb generally). Although I haven't tried Apache in period myself.. switching out to undertow or jetty may help without any more with.
Which GC settings are you using?
k
Heap is set to 600mbs, Xss is 512k. It's using the default Java 11 GC. The server talks to AWS SNS a lot. Which can be very slow. Sometimes taking over 15 seconds. Other than that standard database and redis actions. It handles anywhere from 1 - 20 rps. I will try switching to undertow or jetty
d
which library are you using for SNS? Is it the amazon SDK?
k
Yes 2.5.15 to be exact