"out of memory" error with internal (HSQLDB) database

If during the TeamCity server start-up you encounter errors like:

  • "error in script file line: ... out of memory"
  • "java.sql.SQLException: out of memory",
    perform the following:
  • try increasing server memory. If this does not help, most probably this means that you have encountered internal database corruption. You can try to deal with this corruption using the notes based on the HSQLDB documentation.

A way to attempt a manual database restore:

  • stop the TeamCity server
  • backup the <TeamCity Data Directory>/system/buildserver.data file
  • remove the <TeamCity Data Directory>/system/buildserver.data file and replace it with zero-size file of the same name.
  • start the TeamCity server

However, if the database does not recover automatically, chances that it can be fixed manually are minimal.

The internal (HSQL) database is not stable enough for production use and we highly recommend using an external database for TeamCity non-evaluation usage.
If you encountered database corruption, you can restore the last good backup or drop builds history and users, but preserve the settings, see Migrating to an External Database#Switching to Another Database.

0 out of 0 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request