Openfire 3.10.2 crashing multiple times a day

2 or 3 times a day, my Openfire server is crashing. Up until about a week ago, we had zero issues.

The log:

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.

java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: ETh error starting the server. Please check the log files for more information.

database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:786)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:499)

at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:216)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)

at com.exe4j.runtime.WinLauncher.main(Unknown Source)

at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)

Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:152)

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:776)

… 16 more

Any thoughts? Driving my users crazy. Also, I went looking at the Professional Partners page to see if I could get some remote support and neither of the companies listed actually provide any support for Openfire: Ignite Realtime: Support - Professional Partners

I would recommend moving to an external database, like mysql or ms sql (express works well)

If you can’t do that, then look at your memory usage, cpu, antivirus, disk io, etc and go from there.

Although I haven’t tested it, another option may be to turn off locking.

in openfire/embedded-db/openfire.properties try changing

hsqldb.nio_data_file=true to false

and add

hsqldb.lock_file=false