Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-21000

Ambari does not work with PGBouncer/PostgreSQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.2
    • 2.5.2
    • None
    • None

    Description

      When using JDBC with PGBouncer (a connection pooler for PostgreSQL), prepared statements must be disabled on the client side. According to the PgBouncer FAQ, this is done by passing "prepareThreshold=0" in the JDBC URL. Even when using "prepareThreshold=0", Ambari returns errors of the form "prepared statement "S_1" does not exist". This is because Ambari uses Quartz, which uses C3P0. Quartz by default configures C3P0 to cache prepared statements by setting maxStatementsPerConnection=120. Fortunately, Quartz also allows you to override this C3P0 setting by passing a property named "maxCachedStatementsPerConnection". When setting this property to 0 (which is the default in C3P0), then Ambari works properly with PGBouncer.

      Attachments

        1. AMBARI-21000.01.patch
          2 kB
          Robert Yokota

        Activity

          People

            rayokota Robert Yokota
            rayokota Robert Yokota
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: