Maxim Khutornenko created AURORA-926:
----------------------------------------
Summary: Scheduler crashes due to JVM running out of memory on
start
Key: AURORA-926
URL: https://issues.apache.org/jira/browse/AURORA-926
Project: Aurora
Issue Type: Bug
Components: Scheduler
Reporter: Maxim Khutornenko
Assignee: Maxim Khutornenko
This is related to the recent changes in AURORA-920. When scheduler starts it
goes through all tasks in the log and generates a multitude of events (e.g.
TaskStateChange.initialized(task)). For the new AsyncEventBus we use a
Executors.newCachedThreadPool(), which does not have an upper bound on how many
threads it can create when needed (well, technically it's bounded by
Integer.MAX_VALUE). That leads to an out of control thread creation and
eventual out of memory JVM crash.
Use ThreadPoolExecutor with a bounded {{maximumPoolSize}} to control the memory
consumption. The AsyncEventBus uses a simple ConcurrentLinkedQueue to enqueue
events, so there is no risk in timing out due to slower event processing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)