Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-591

Log4j closes MongoDB connections after the first log message

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc1
    • Fix Version/s: 2.0-rc2
    • Component/s: Appenders
    • Labels:
      None

      Description

      It seems that the AbstractDatabaseManager behavior is now to close the connection after the buffer is flushed (or immediately after a write if there is no buffer). These are the calls to commitAndClose().

      The intended behavior for close() is that it would return a connection to the connection pool. That would make sense for most good database drivers.

      However, the MongoDBProvider simply closes the MongoClient, releasing the entire pool. This means that further attempts to write to the log, after the first time, will fail.

        Attachments

          Activity

            People

            • Assignee:
              jvz Matt Sicker
              Reporter:
              emblemparade Tal Liron
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: