powered by Jive Software

Openfire database configuration

Hi Team,

I have installed openfire server 4.0.2 and we have developed chat application using it and we deployed to play store.

We have now more then 50k + users but we stucked with one db configuration of openfire server.

Sometime it gives error like below and we are not getting stored each message.

java.sql.SQLException: Couldn’t perform the operation prepareStatement: You can’t perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs).
at org.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:207)
at org.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87)
at $java.sql.Wrapper$$EnhancerByProxool$$964e71d4.prepareStatement()
at org.jivesoftware.database.ProfiledConnection.prepareStatement(ProfiledConnection.java:608)

i am not sure how to deal with such error.

Some time it shows that active connection is more then available connection does it make any impact ?

please check above image for reference.

Could any one help me to suggest db connection properties in proper way.

Please help me we stucked with the process and we are helpless now.

Thanks,

what database are you using?

Your configuration allows Openfire to create up to 2500 connections to your database. This is unlikely to be accepted by your database. It is likely that your database is killing connections, causing this problem.

I am using ms SQL sever 2014.

If i am not increasing this number of db connection then it will sometimes failed showing no connection retrieved after enough try.

Not sure what is proper way to do that.

It appears that Openfire is asking more from your database than it can handle. Try analysing what queries are currently taking a lot of resources. Maybe you can add some indexes that speed things up.

MS SQL should be able to handle that. You may want to double check your SQL server settings though to make sure that your not limiting your user connections. Perhaps dropping the max connections down to 100 to see what happens?

Its also possible that your database is slow…perhaps hitting a time out issue?

Another thing you can try is to change the system property database.defaultProvider.driver to net.sourceforge.jtds.jdbcx.JtdsDataSource

Lastly, maybe try the nightly build. @gdt recently did some work in this area

Ok sure i will try it.

But i think some operation like archiving is taking too much time and sometime i can also check deadlock in error log not sure what is the solution as of now.

The nightly replaces Proxool in favour of Commons DBCP, and also offers the option of using the MS JDBC drivers instead of the JTDS ones.

However, it sounds like you’ve got bigger problems going in if you’ve got deadlocks potentially caused by an archiving issue.