
Hi Jamie, It’s not clear how your “multi-tennent” approach affects the loading of logback. I guess somehow you are creating new instances of logback? Each instance of AsyncAppender is blocking, and thus requires one thread per per AsyncAppender. Dave
On 14 Dec 2017, at 21:28, Jamie <jamie@stimulussoft.com> wrote:
Hi
I'd appreciate guidance on how to get Logback to use less resources in our multitenant app. It seems every time we add a new tenant, log back creates a few more async appender threads. This affects the scalability of our software. In our app, each tenant has an audit and a debug log. Async apppender is being used to write to each log respectively. Our problem is that whenever a new tenant is added, many more threads get created. it seems a new worker thread is assigned to each appender. Is there a way to get Logback to rather use a shared thread pool?
Stacks at 2017-12-14 10:33:57 PM (uptime 22m 24s)
AsyncAppender-Worker-audit-template [WAITING] [DAEMON] sun.misc.Unsafe.park(boolean, long) Unsafe.java (native) java.util.concurrent.locks.LockSupport.park(Object) LockSupport.java:175 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() AbstractQueuedSynchronizer.java:2039 java.util.concurrent.ArrayBlockingQueue.take() ArrayBlockingQueue.java:403 ch.qos.logback.core.AsyncAppenderBase$Worker.run() AsyncAppenderBase.java:289
Thanks in advance
Jamie
_______________________________________________ logback-user mailing list logback-user@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user