TC Out of Memory Error

I received an out of memory error on TeamCity and now it will not restart.

Here is the out of memory error:

org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state ; error code ; out of memory; nested exception is java.sql.SQLException: out of memory
org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state ; error code ; out of memory; nested exception is java.sql.SQLException: out of memory
java.sql.SQLException: out of memory
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.execute(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
at jetbrains.buildServer.serverSide.impl.query.Query.execute(Query.java:2)
at jetbrains.buildServer.serverSide.impl.query.RunningBuildInsertQuery.exec(RunningBuildInsertQuery.java)
at jetbrains.buildServer.serverSide.impl.DBFacade$2.run(DBFacade.java:2)
at jetbrains.buildServer.serverSide.impl.DBFacade$13.doInConnection(DBFacade.java:2)
at jetbrains.buildServer.serverSide.impl.DBFacade$15.doInConnection(DBFacade.java:3)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:230)
at jetbrains.buildServer.serverSide.impl.DBFacade._runSql(DBFacade.java:57)
at jetbrains.buildServer.serverSide.impl.DBFacade.runSql(DBFacade.java:170)
at jetbrains.buildServer.serverSide.impl.DBFacade.addRunningBuildEntry(DBFacade.java:49)
at jetbrains.buildServer.serverSide.impl.BuildServerImpl.addRunningBuildEntry(BuildServerImpl.java:342)
at jetbrains.buildServer.serverSide.impl.BuildStarter$1$3.run(BuildStarter.java:2)
at jetbrains.buildServer.serverSide.impl.BuildStarter.runningBuildSynchronized(BuildStarter.java:22)
at jetbrains.buildServer.serverSide.impl.BuildStarter.access$100(BuildStarter.java:72)
at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:31)
at java.lang.Thread.run(Thread.java:595)

Here is what's in the teamcity-agent.log when trying to start it:

INFO - erver.agent.ant.AntBuildRunner - Ant Runner Extensions: jetbrains.buildServer.coverage.AntCoverageAdapter,jetbrains.buildServer.testng.TestNGTaskExtension,jetbrains.buildServer.agent.ant.CompilerAntExtension,jetbrains.buildServer.agent.ant.EchoAntExtension,
INFO - jetbrains.buildServer.AGENT - Calculating plugins signature for possible upgrade
INFO - jetbrains.buildServer.AGENT - Build Agent version: 4261, plugins signature: 58880268
INFO - er.agent.DotNetBuildRunnerBase - sln2003 runner can works only under Windows
INFO - jetbrains.buildServer.AGENT - Runner sln2003 was not registered
INFO - er.agent.DotNetBuildRunnerBase - sln2005 runner can works only under Windows
INFO - jetbrains.buildServer.AGENT - Runner sln2005 was not registered
INFO - er.agent.DotNetBuildRunnerBase - MSBuild runner can works only under Windows
INFO - jetbrains.buildServer.AGENT - Runner MSBuild was not registered
INFO - er.agent.DotNetBuildRunnerBase - NAnt runner can works only under Windows
INFO - jetbrains.buildServer.AGENT - Runner NAnt was not registered
INFO - jetbrains.buildServer.AGENT - Start build agent
WARN - jetbrains.buildServer.AGENT - Starting agent Web server on port 9090
INFO - jetbrains.buildServer.AGENT - Agent Web server started
INFO - jetbrains.buildServer.AGENT - Build agent started
INFO - brains.buildServer.NetworkUtil - Found Network Interfaces:
INFO - buildServer.AGENT.registration - Registering agent "maverick" (172.29.2.143:9090) on http://maverick:8111
with runners:
WARN - buildServer.AGENT.registration - Call http://maverick:8111/RPC2 buildServer.register: java.io.FileNotFoundException: http://maverick:8111/RPC2
WARN - buildServer.AGENT.registration - Connection to TeamCity server is probably lost. Will be trying to restore it. Take a look at logs/teamcity-agent.log for details (unless you're using custom logging).

How do I get TC to start? Thanks, Linda

2 comments

Hello Linda,

Most likely your HSQLDB database got corrupted :(. You need either to re-create it or (better) setup MysqlDB: http://www.jetbrains.net/confluence/display/TCD/MigratingtoMySQL+database

If you want to recreate HSQLDB database, follow the following steps:
1. Backup your artifacts from .BuildServer/system/artifacts directory, if needed
2. Remove .BuildServer/system/[artifacts|messages|changes|buildserver.*] files and directories
3. Restart TeamCity. You configurations will remain, but you'll have to recreate user accounts and build history will be empty.

Kind regards and sorry,

KIR

0

Please sign in to leave a comment.