Icon

You are viewing the documentation of TeamCity 9.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.x documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
  • note the TeamCity version in use, including the build number (can be found in the footer and the teamcity-server.log). Consider checking if the issue is still relevant in the most recent TeamCity version;
  • note all previous postings on the same topic you have made of found;
  • do not combine several issues into one posting;
  • note the pattern of issue occurrence (first time, recurring), how it was mitigated before, whether there were any recent environment changes;
  • describe expected and actual behavior;
  • include related screenshots (always include the entire page and the browser URL in the capture);
  • include related text messages as text (not as image), include the messages with all the details;
  • attach/upload archive with TeamCity server logs (entire <server home>\logs directory is the best); if related to the build-time or agent behavior, attach entire <agent home>\logs directory;
  • for performance/slowness/delays issues take a set of server or agent thread dumps during the issue occurrence;
  • when sending files greater than 500Kb in size or more than three files, package them into a single archive;
  • when replacing/masking data in logs, note the replacements patterns used;
  • note if there is an anti-virus installed and if there is a network proxy;
  • when relevant, note OS, versions of any manually installed components like Java, used TeamCity distribution (.exe, .tar.gz)
  • note any customization/not standard environment settings;
  • when reporting build issues, note whether they are reproducing when the build is run without TeamCity on the agent machine;
  • when suggesting an improvement or feature or asking settings advice, detail why you need the feature and what is the original goal you want to achieve. Suggestions as to how you would like to see the feature are welcome too;
  • check the sections below for common cases and specific information to collect and send to us.

...

Then send us a detailed description of the issue accompanied with the thread dumps and full server (or agent) logs covering the issue. Unless it is undesirable for some reason, the preferred way is to file an issue into our issue tracker and let us know via feedback email. Please include all the relevant details of investigation, including the CPU/IO load information, what specifically is slow and what is not, note URLs, visible effects, etc.
For large amounts of data, please use our FTP.

Server Thread Dump

It is recommended that you take a thread dump of the TeamCity server from the Web UI (if the hanging is local and you can still open the TeamCity Administration pages): go to the Administration | Server Administration | Diagnostics page 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 the <TeamCity Home>/logs directory (where you can later download the files from "Server Logs").
If the web UI is not responsive, try the direct URL using the actual URL of your TeamCity server.

If the UI is not accessible, you can take a server thread dump manually using the approaches described below.

You can also adjust the teamcity.diagnostics.requestTime.threshold.ms=30000 internal property to change the timeout after which a thread dump is automatically created in the threadDumps-<date> directory under TeamCity logs whenever there is a user-originated web request taking longer than timeout.

...

If the UI is not accessible, you can take the dump thread manually using the approaches described below. Note that the TeamCity agent consists of two java processes: the launcher and agent itself. The agent is triggered by the launcher. You will usually be interested in the agent (nested) process and not the launcher one.

...

  • run jstack <pid_of_java_process> (using jstack from the Java installation as used by the process) or kill -3 <pid_of_java_process>. In the latter case output will appear in <TeamCity Home>/logs/catalina.out or <TeamCity agent home>/logs/error.log.

See also Server Performance section above.

Database-related Slowdowns

...

The log can also be sent to us for analysis.

Back to top

Anchor
oom
oom

OutOfMemory Problems

...

  • Determine what process encounters the error (the actual building process, the TeamCity server, or the TeamCity agent). You can track memory and CPU usage by TeamCity with the charts on the Administration | Server Administration | Diagnostics page of your TeamCity web UI.
  • If the server is to blame, please check you have increased memory settings from the default ones for using the server in production (see the section).
  • If the build process is to blame, set "JVM Command Line Parameters" settings in the build runner.  Increase value for '-Xmx' JVM option, like -Xmx1200m. If the error message is "java.lang.OutOfMemoryError: PermGen space", increase the value in -XX:MaxPermSize=270m JVM option. e.g. Java Inspections builds may specifically need to increase -Xmx value;
  • Anchor
    serverMemoryDump
    serverMemoryDump
    If the TeamCity server is to blame and increasing the memory size does not help, please report the case for us to investigate. For this, while the server is high on memory consumption, take several server thread dumps as described above, get the memory dump (see below) and all the server logs, archive the results and send them to us for further analysis. If you have increased the Xmx setting, please reduce it to the usual one before getting the dump (smaller snapshots are easier to analyze and easier to upload):
    • to get a memory dump (hprof file) automatically when an OutOfMemory error occurs, add the following server JVM option (works for JDK 1.5.0_07+): -XX:+HeapDumpOnOutOfMemoryError. When OOM error occurs next time, the java_xxx.hprof file will be created in the process startup directory (<TeamCity Home>/bin or <TeamCity Agent home>/bin);
    • you can also take memory dump manually when the memory usage is at its peak. Go to the Administration | Server Administration | Diagnostics page of your TeamCity web UI and click Dump Memory Snapshot.
    • another approach to take a memory dump manually is to run the TeamCity server with JDK 1.6+ and use the jmap standard JVM util. e.g. jmap -dump:file=<file_on_disk_to_save_dump_into>.hprof <pid_of_your_TeamCity_server_process>

See how to change JVM options for the server and for agents.

Back to top

"Too many open files" Error

...

TeamCity Server Logs
Viewing Build Agent Logs

Back to top

Version Control debug logging
Anchor
vcs
vcs

...

First, please enable the generic VCS debug logging, as described above.

Uncomment the SVN-related parts (the SVN.LOG appender and javasvn.output category) of the Log4j configuration file on the server and on the agent (if the 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

...

the build log and the agent log will contain the line "Patch is saved to file ${file.name}"
Get the file and provide it with the problem description.

Back to top

Logging for .NET Runners

To investigate process launch issues for .Net-related runners, enable debugging as described below. The detailed information will then be printed into the build log. It is recommended not to have the debug logging for a long time and revert the settings after investigation.

...

Expand
titleAlternative way to enable the logging
  1. Open the <agent home>/plugins/dotnetPlugin/bin folder.
  2. Make a backup copy of teamcity-log4net.xml
  3. Replace teamcity-log4net.xml with the content of teamcity-log4net-debug.xml
Note

After a debug log is created, it is recommended to roll back the change.
The change in the teamcity-log4net.xml will be removed on the build agent autoupgrade.

Back to top

Anchor
remote
remote

Remote Run Problems

The changes that are sent from the IDE to the server on a remote run can be retrieved from the server .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 URL of the change from the web UI).
The file contains the patch in the binary form. Please provide it with the problem description.

Back to top

Logging in IntelliJ IDEA/Platform-based IDEs

...

  • Provide us your IDEA VCS settings and TeamCity VCS settings (for the build configurations you expect to be suitable with your IDEA project)
  • Enable debug logs for the TeamCity IntelliJ plugin (see above)
  • Enable the TeamCity server debug logs (see above)
  • In the TeamCity IntelliJ plugin, try to start a remote run build
  • Provide us debug logs from the TeamCity IntelliJ plugin and from the TeamCity server.

Back to top

Logging in TeamCity Eclipse plugin

...

Read more about Eclipse Debug mode Gathering Information About Your Plug-in and built-in Eclipse help.

Back to top

TeamCity Visual Studio Addin issues

...

To troubleshoot common Visual Studio problems please run Visual Studio executable file with /Log command Line switch and send us resulting log file.

Back to top

dotCover Issues

To collect additional logs generated by JetBrains dotCover, add the teamcity.agent.dotCover.log configuration parameter to the build configuration with a path to an empty directory on the agent.
All dotCover log files will be placed there and TeamCity will publish zipped logs as hidden build artifact .teamcity/.NETCoverage/dotCoverLogs.zip.

Wiki Markup
{hidden-data}from http://youtrack.jetbrains.com/issue/TW-17058#comment=27-240592{hidden-data}

...

Files under 10 MB in size can be attached right into the tracker issue (if you do not want the attachments to be publicly accessible, limit the attachment visibility to "teamcity-developers" user group only).
You can also send small files (up to 2 MB) via email: teamcity-support@jetbrains.com or via online form (up to 20 MB). Please do not forget to mention your TeamCity version and environment and archive the files before attaching.

...

HTTP
You can upload a file via https://uploads.jetbrains.com/ form and let us know the exact file name.

Back to top