https://bz.apache.org/bugzilla/show_bug.cgi?id=68868
Bug ID: 68868
Summary: Log rotation in a Spring Boot application leaves
threads in timed_waiting state
Product: Tomcat 10
Version: unspecified
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Authentication
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ------
Have detailed the issue as observed over
https://stackoverflow.com/questions/78127250/unusual-spike-in-thread-counts-every-midnight-in-springboot-application,
but to share a gist of the issue as observed:
One of our applications has enabled daily log rotation over a log file from
multiple pods writing to the same. Apparently during the time of rotation at
midnight, multiple threads of our application were left timed_waiting, these
over days resulted in OOM and application restarts.
Sample stacktrace from the thread dump looked like:
"http-nio-8080-exec-61" #37660 [37664] daemon prio=5 os_prio=0 cpu=38462.67ms
elapsed=46889.40s tid=0x00007f2e0c0557b0 nid=37664 waiting on condition
[0x00007f2ddf2fe000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@21/Native Method)
- parking to wait for <0x0000000684f26058> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.parkNanos(java.base@21/LockSupport.java:269)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@21/AbstractQueuedSynchronizer.java:1758)
at
java.util.concurrent.LinkedBlockingQueue.poll(java.base@21/LinkedBlockingQueue.java:460)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:99)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:33)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1113)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.runWith(java.base@21/Thread.java:1596)
at java.lang.Thread.run(java.base@21/Thread.java:1583)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]