I'm having a problem with Teamcity currently. When our server restarts Teamcity fails to restart properly. In looking at the logs it seems to be hanging at the line "Loading history of VCS changes...".
[2015-05-27 12:15:14,659] INFO - jetbrains.buildServer.SERVER - Server configuration loaded
[2015-05-27 12:15:14,763] INFO - jetbrains.buildServer.SERVER - Start prefetching changes for 4 build configurations...
[2015-05-27 12:15:14,763] INFO - jetbrains.buildServer.SERVER - Loading history of VCS changes...
[2015-05-27 12:58:24,609] INFO - jetbrains.buildServer.STARTUP - Server shutdown has been requested
As you can see Teamcity is just hanging until I shut it down.
Some looking at other points in the log pointed me at the following error accessing MySql:
SQL error when doing: Executing with parameters: [1, 50001] caused SQL error:
SQL query: select h.modification_id, h.user_name, h.description, h.change_date, h.vcs_root_id, h.version, h.display_version, h.changes_count, h.register_date from vcs_history h join vcs_root_instance v on (h.vcs_root_id = v.id) where h.modification_id >= ? and h.modification_id < ? order by modification_id
SQL exception: Communications link failure
If I try to run this on my SQL server (via HeidiSQL) it seems to fail if there are more than a certain number of rows returned (14561 to be precise) with error message "SQL Error (2027): Malformed packet".
As a temporary fix I have identified rwos in vcs_root_instance and flipped their ids to negative so that the join finds less than 14561 rows. However this doesn't seem to be a good long term solution (as demonstrated by the fact I've had to do this twice already).
I've looked around to see if I coudl find any settings on mysql that could be wrong but have found nothing that makes a difference. I've also found nothing to help me diagnose the error any further than this.
So I have two questions:
1) Are there settings on MySql that would cause this problem and if so how can I fix them? (I've already gone through the settings on http://confluence.jetbrains.com/display/TCD9/How+To...#HowTo...-ConfigureNewlyInstalledMySQLServer
and ensured they are all set)
2) Is there a way through the software to clean up the vcs_history and vcs_root_instance tables properly? I've deleted unused VCS roots from the interface but it doesn't seem to get rid of them from the database.
Many thanks for any help on this. Its a pain in the neck having to go and modify this table to try to fix it whenever it comes up and sooner or later our VCS history will grow large enough that our current active VCS roots alone will cause this problem so it'd be nice to get it fixed.
Edit: I just realised I should probably mention that we are running version "9.0.3 (build 32334)"