We're updating the issue view to help you get more done. 

DefaultPubSubPersistenceProvider#savePublishedItems is leaking database connections

Description

Debugging a database lockup with Openfire on igniterealtime, I find this current table of database connections from Openfire

 

{{state | state_change | query }}
-------+-------------------------------+--------------------------------------------------------------------------------------------------------
{{ idle | 2020-08-09 20:05:27.088511+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:05:28.751427+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:05:30.111524+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:05:34.471701+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:05:55.792534+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:05:58.655866+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:06:01.446014+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:06:39.185067+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:06:41.353949+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 20:07:24.630695+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:02:11.137756+00 | UPDATE ofConversation SET lastActivity=$1, messageCount=$2 WHERE conversationID=$3}}
{{ idle | 2020-08-09 21:03:07.21855+00 | UPDATE ofRRDs SET bytes = $1, updatedDate=$2 WHERE id = $3}}
{{ idle | 2020-08-09 21:15:04.400764+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:15:05.783153+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:15:07.230171+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:15:10.566564+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:16:02.616534+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:16:06.375627+00 | UPDATE ofPubsubItem SET jid=$1, creationDate=$2, payload=$3 WHERE serviceID=$4 AND nodeID=$5 AND id=$6}}
{{ idle | 2020-08-09 21:16:33.448738+00 | UPDATE ofConversation SET lastActivity=$1, messageCount=$2 WHERE conversationID=$3}}
{{ idle | 2020-08-09 21:25:07.21555+00 | UPDATE ofRRDs SET bytes = $1, updatedDate=$2 WHERE id = $3}}

 

It appears the database connection is not getting closed properly.  PR ahoy

 

Environment

None

Acceptance Test - Entry

None
Fixed

Assignee

Guus der Kinderen

Reporter

Daryl Herzmann

Labels

None

Expected Effort

None

Ignite Forum URL

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure