Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2646

Database Binary Store not closing connection when

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 5.3.0.Final
    • 5.2.0.Final
    • None
    • None

      When I read multiple file I keep running into the following error:

      javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])
      
      I read multiple files from modeshape and after reading a file I call the dispose method from the binary before reading the next one. So basically only one connection should be enough.  
      
      I have turned on jdbc spy and this is the output:
      
      Read file
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [DataSource] getConnection()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [Connection] prepareStatement(SELECT payload FROM CONTENT_STORE WHERE cid = CAST(? AS VARCHAR) AND usage_flag = CAST(1 AS INTEGER))
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [PreparedStatement] setString(1, 6e63f04d75d046bdad6ed47b4ac792501a26f8ce)
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [PreparedStatement] executeQuery()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [ResultSet] next()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [PreparedStatement] close()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [Connection] isClosed()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [Connection] prepareStatement(SELECT payload FROM CONTENT_STORE WHERE cid = CAST(? AS VARCHAR) AND usage_flag = CAST(0 AS INTEGER))
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [PreparedStatement] setString(1, 6e63f04d75d046bdad6ed47b4ac792501a26f8ce)
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [PreparedStatement] executeQuery()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [ResultSet] next()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [PreparedStatement] close()
      [jboss.jdbc.spy] java:/jdbc/modeshapeDS [Connection] isClosed()
      Dispose binary
      Read file
      ...
      

      The git connector seems to be opening a connection but is not closing it anymore.
      I have looked into the git code but couldn't easily find where the code is opening the connection but not closing it.

            Unassigned Unassigned
            pverboom Patrick Verboom (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: