Frage

I've just found out that TeamCity runs on the 32-bit JVM on Windows, for some reason.

I'm seeing memory errors logged when checking out a large (not that large) Git repo and am already at the max heap size for the JVM. I know nothing about Java or the JVM, or TomCat.

How can I run TeamCity on a modern, 64-bit JVM? I sense its going to be a pain, else it would be the default.

We're a tiny team and if something doesn't have Apple levels of 'it just works' then we skip it.

We can live with this one project not be on the CI server, but it would be nice to know what's involved and weigh up the investment.

Any advice appreciated.

Edit

Okay so Markus pointed to this snippet (which I had read), but I can't see any information there explaining what to do.

Using 64 bit Java to Run TeamCity Server TeamCity can run under both 32 and 64 bit JVM. It is recommended to use 32 bit JVM unless you need to dedicate more than 1.3Gb of memory to the TeamCity process.

If you choose to use x64 JVM please note that the memory usage is almost doubled when switching from 32 to 64 bit JVM, so please make sure you specify at least twice as much memory as for 32 bit JVM, see Setting Up Memory settings for TeamCity Server.

If you run TeamCity as a service and switch to x64 bit, you will also need to use x64 Tomcat executables, see more.

Did I miss something?

Edit 2

Ah, okay, buried in some paragraphs above that link is this:

"if you run as Windows service and want to upgrade JRE to 64 bit version, you will need to replace \jre with appropriate JRE"

So I guess I need to copy some files into the /jre folder?

War es hilfreich?

Lösung 2

The snippet from the updated question had a link in the original, pointing to the instructions on Java update for TeamCity server in TeamCity online doc.

Basically, the instructions vary based on the TeamCity distribution used and way of launching the server.

If your intent is to increase the memory for the TeamCity server, please make sure to read through the corresponding section on the same doc page.

Yet one more note: recent TeamCity versions perform Git fetch in a separate process and Git-related memory issues during fetch might require fine-tuning of the corresponding options.

Andere Tipps

The way I made it work (TeamCity 8, Windows server 2008 r2):

  • Install the 64-bit JRE on the target machine, now there are two ways to do this

  • A -> If you are using the Teamcity bundled JRE, replace the JRE folder ([TC Server folder]\JRE) with the JRE folder in the newly installed JRE x64 - You have to shut down the TC server service (along with all java.exe*32 services that might also use this JRE)

  • B -> Change the TeamCity Internal properties, to point to newly installed JRE x64 (see documentation for TC version 8, TC version 9 can be found here):

    java.home=C\:\\<JRE x64 install folder>\\jre
    java.ext.dirs=C\:\\<JRE x64 install folder>\\jre\\lib\\ext\;C\:\\Windows\\Sun\\Java\\lib\\ext 
    java.library.path=C\:\\<JRE x64 install folder>\\jre\\bin\;C\:\\Windows\\Sun\\Java\\bin\;C\:\\Windows\\system32\;C\:\\Windows\;C\:\\local\\Oracle\\clients\\112_64\\bin\;C\:\\local\\Oracle… 
    
  • An alternative to point B would be to change Environment variable JAVA_HOME, it`s more simple, but it requires a Windows server restart after that

  • If you run the TC Server service now, it should run as a 64-bit Java process (chceck via PID in task manager) :

Resource  Monitor Task Manager

"So I guess I need to copy some files into the /jre folder?"

No. You install a 64 bit JRE, and update the relevant setting to point at the 64-bit install's JRE.

Don't copy stuff from one JRE installation into another. You will break things!

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top