Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-926

Scheduler crashes due to JVM running out of memory on start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.8.0
    • Scheduler
    • None
    • Twitter Aurora Q4 Sprint 3

    Description

      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.

      Attachments

        Activity

          People

            maximk Maxim Khutornenko
            maximk Maxim Khutornenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: