| You are viewing documentation of TeamCity 6.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version. |
|
To fix a problem, we may need a wide range of information about your system as well as various logs. The section below explains how to collect such information. In this section: Hangs and Thread DumpsIf you experience problems with the TeamCity server or agent (e.g. no responding or working too slow) we would appreciate a thread dump of the process taken in the moment of the slowness. Determine what process is slow Server thread dumpYou can take a thread dump of the TeamCity server right from the web UI (if the hanging is local and you can still open administration pages): go to the Administration | Server Configuration | Diagnostics tab and click the View server thread dump link to open the thread dump in a new browser window or Save Thread Dump button to save it to <TeamCity home>/logs directory (where you can later download the files from "Server Logs"). A small hint: if web UI is not responsive try direct URL substituting your server URL. If the server UI is not usable please use approaches described below. Agent thread dumpIf you need agent thread dump, please note that TeamCity agent consists of two java processes: launcher and agent itself. Agent is run by the launcher process. You will usually be interested in the agent (more nested one) and not the launcher process. Thread dump taking approachesTo take a thread dump:
If the hanging process is run as a service, taking the thread dump is more complicated and under some environments does not have a reliable approach. Recommended approach is to run the agent or server process from a console and use Ctrl+Break approach above. Alternatively, you can try to run a thread dumping tool using Microsoft PsExec. where:
You can also use third-party GUI tool: AdaptJ StackTrace Utility. See also Server Performance section below. Database-related slowdownsWhen the server is slow it makes scene to check if slowness is caused by the database operations. MySQLAlong with server thread dump, please attach output of "show processlist;" SQL command executed in MySQL console. Much like the thread dumps it makes sense to execute the command when the slowness is occurring several times and send us the output. The log can also be sent to us for analysis. OutOfMemory ProblemsIf you experience problems with TeamCity "eating" too much memory (OutOfMemory errors), please do the following:
See how to change JVM options for the server and for agents. Logging EventsTeamCity server and agent create logs that can be used to investigate issues.
For detailed information, please refer to the corresponding sections: TeamCity Server Logs Version Control Debug LoggingIn general, to debug VCS problems we need information for jetbrains.buildServer.VCS Log4j category. Alternatively, you can change the Log4j configuration manually in <TeamCity home>\conf\teamcity-server-log4j.xml or <BuildAgent home>\conf\teamcity-agent-log4j.xml files to have fragment: If there are separate logging options for specific version controls, they are described below. Subversion Integration Debug LoggingUse "debug-vcs" logging preset in administration web UI and then retrieve logs/teamcity-svn.log log file. Alternative manual approach: Uncomment SVN-related parts (SVN.LOG appender and javasvn.output category) of Log4j configuration file on server and on agent (if agent-side checkout is used). The log will be saved to the logs/teamcity-svn.log file. Generic VCS log should be also taken from logs/teamcity-vcs.log ClearCaseUncomment Clearcase-related lines in the <TeamCity home>\conf\teamcity-server-log4j.xml file. Patch Application ProblemsIn case server-side checkout is used, the "patch" that is passed from server to the agent can be retrieved by:
Agent log will contain the line "Patch is saved to file ${file.name}" Remote Run ProblemsThe changes that are sent form the IDE to the server on a remote run can be retrieved from server's .BuildServer\system\changes directory. Locate the <change_number>.changes file that corresponds to your change (you can pick the latest number available or deduce the from the URL of the change form the web UI). Server PerformanceIf you experience degraded server performance and TeamCity server process is producing large CPU load, please take the CPU profiling snapshot and send it to us accompanied with the detailed description of what you were doing and what is your system setup. Here are some hints to get the best results from CPU profiling:
Logging in TeamCity Visual Studio pluginTo capture logs from TeamCity Visual Studio plugin please do the following:
Logging in TeamCity Eclipse pluginAvailable only since TeamCity 4.5 To enable tracing for the plugin, run Eclipse IDE with the -debug <filename> program argument. The <filename> portion of the program argument is a properties file containing key-value pairs. Name of each property corresponds to the plugin module and value is either 'true' (to enable debug) or 'false'. Here is an example of enabling most common tracing options: Read more about Eclipse Debug mode Gathering Information About Your Plug-in and built-in Eclipse help. Sending Information to the DevelopersFiles under 5Mb in size can be attached right into the tracker issue (if you do not want the attachments to be publicly accessible, limit viewing the attachment to "teamcity-developers" user group only). If the file is over 5 Mb, you can upload the archived files to ftp://ftp.intellij.net/.uploads and let us know the exact file name. If you receive permission denied error on upload attempt, please rename the file. It's OK that you do not see the file listing on the FTP. You can also send small files via email: teamcity-feedback@jetbrains.com Please do not forget to mention your TeamCity version and environment |