We are running Teamcity connected to TFS. On our Teamcity server there are two Java processes one for running Teamcity and one for connecting to TFS. The Teamcity process, I am able to increase the amount of RAM associated with it by updating the following environment variable TEAMCITY_SERVER_MEM_OPTS.
The other process for connecting to TFS, I am not able to increase the RAM. I was able to retrieve the command line for this process and noticed there was only 1gb of memory allocated to it. As can be seen by the following command line.
C:\TeamCity\jre\bin\java -Dfile.encoding=UTF-8 -Dcom.microsoft.tfs.jni.native.base-
directory=C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\tfsSdk\14.119.2\native -Xmx1024M
The real issue is the second Java process is taking up 100% CPU and hopefully by increasing the memory for this process it will alleviate the issue.
Related
I've been running Memgraph for a few days now and everything is working as expected. This is the first time that I'm using Docker.
I've noticed that when I shut down the Memgraph Platform my RAM is still used. I need to restart my computer to free up my RAM. Is there some switch that I can use to limit the memory that Memgraph Platform uses? Is there some way to release the memory after I shut it down?
If it is important, my OS is Windows 10 Professional and I have a 6 years old laptop with 8GB of RAM.
The issue you are experiencing is not related to Memgraph, but Docker or to WSL2 to be more precise. You say that you use Windows 10 so I presume your Docker is configured to use WSL2.
You didn't write which exact build of Windows 10 you are using, but depending on it WSL can use up to 80% of your RAM if you don't limit it.
When you run the Docker image you will see a process called vmmem. When you shutdown running Docker image this process will still occupy your RAM. Restarting your computer frees up the RAM, which is what you are experiencing.
The solution is not to change the configuration of your Memgraph, but to configure Docker. You need to limit the amount of memory that WSL2 can use. But be careful; this is a change that will affect all of your WSL2 instances, not just the Docker ones.
The exact steps that you need to do are:
Shutdown all of the WSL instances with wsl --shutdown
Edit the .wslconfig file (it is located in your user profile folder)
Add the following lines to it:
[wsl2]
memory=3GB
This will limit the RAM usage of WSL to 3GB. I hope that this will help you.
Some days ago I upgraded my codebase from jest 26 to 27.
Running tests in my local environment worked like a charm but, when I tried to run them on my CI machine, the tests "never" stop.
Actually, in CI, the process exited correctly when trying to run tests sequentially but not in parallel, eg with --runInBand --detectOpenHandles --forceExit.
I tried to build and run the same docker locally... and it worked.
Changing randomly some docker's CPU / RAM configs, I achieved the same result: the process hangs.
Tests hanging:
Running top in docker:
As you can see, it's not a problem of CPU / RAM considering what top says.
Do you have any hints?
Do you need more information?
After some days debugging, I figured out that the problem was the amount of RAM and some memory leaks in the tests.
I advise you to use the node --expose-gc ./node_modules/.bin/jest --logHeapUsage command to dive into the problems you can have. https://jestjs.io/docs/cli#--logheapusage
This post helped me out as well: https://chanind.github.io/javascript/2019/10/12/jest-tests-memory-leak.html
TL;DR:
I fixed memory leaks by downgrading node from 16.13.2 to 16.10.0.
Details:
Based on Mattia Larentis answer:
I had the same problem, code and tests were written for client app, used packages:
node: 16.13.2
jest: 27.4.7
ts-jest: 27.1.3
typescript: 4.5.5
After debugging and analysing jest tests, I detected memory leaks too, using:
node --expose-gc ./node_modules/.bin/jest --logHeapUsage
Then I analysed node heap snapshots (for more info see Your Jest Tests are Leaking Memory).
I found a lot of strings, containing transpiled TS code.
I went to ts-jest & jest repos to look for issues about memory leaks.
I found these:
ts-jest: Module caching memory leak
jest: [Bug]: Memory consumption issues on Node JS 16.11.0+
node: vm Script memory leak in Node.js 14 / 16
Then, I downgraded node version from 16.13.2 to 16.10.0, checked memory leaks using
node --expose-gc ./node_modules/.bin/jest --logHeapUsage
And found that problem was gone.
I have recently started using docker for new development work, however I am still required to switch back to working on our older on-premise offering from time to time. That is, I sometimes need to shutdown docker and spin up a an installation of our on premise server.
I find that when I do this with docker installed the performance of this server is terrible, essentially unusable, I need to uninstall docker to get it to work again.
When I have docker running I can see it using the memory (my machine has 32 GB of RAM, I am telling docker to use 16) and when I shutdown docker I can see it being released, according to the task manager anyway, and I can also see on hyper-v manager that the VM has been shutdown. However the performance of on-premise server install continues to act as the memory is in use. This is not a small performance hit, actions that should take 1 second take 20 or 30.
It would seem like docker is not actually releasing the memory on shutdown and only does so when I actually uninstall it, when I do this performance recovers completely.
Is this a known issue? Is there anything else I can try to see where the memory is going? I can find no other reports about it.
I am using windows 10 with docker version 17.03.1-ce-win5 (10743)
I'm evaluating PlasticSCM on a VMWare Machine with 4GB RAM and 4Core CPU. Since I've ported our trunk into the server (about 6GB of Data), the service ran out of memory (started swapping). I've increased the the VM RAM to 6GB This is actually more than I'd like to load the host system with, since I've also got VMs for PlasticSCM Client, TeamCity Server, TeamCity Agent.
I was trying to find a spec with details on hardware requirement for running PlasticSCM server which incorporates scaling. So far, I've only found the minimum requirement (512MB RAM etc.) and the system information of your heavy load and scale test. As far as I can see, it's all about RAM. :)
Anyway is there a detailed spec with recommendations for the hardware being used?
P.S.: Of course, in case of switching to Plastic we'd run the service on a real machine instead of VM.
Recently I configured my instance into a micro environment in EC2 with glassfish and mysql in windows..
I deployed my war and i was able to access my site through http.
I changed my application and redeployed the war and it also worked.
When I was about to redeploy the war for 4th or 5th time, the application got deployed, I saw the message in the log file. But I was unable to access the site through http.
Then I tried the command "asadmin list-applications" and I got the following message.
Error occurred during initialization of VM
Could not reserve enough space for object heap
After that I was not able to connect to my instance through RDP and I had to reboot, I was able to access it again after that. I started the servers again (glassfish mysql), but no luck.
I noticed that the memory usage is around 90% or more. CPU isage is low.
now I can not access my site through http. what shall i do ?
Thanks in advance !
Honestly, there are a couple issues working against you here:
1) Windows requires FAR more RAM than Ubuntu to run at a minimum decent level.
2) GlassFish has a much larger footprint than Tomcat or Jetty.
Is there any particular reason you need Windows? Like is there a specific need that your server run some executables for file processing or something like that outside the JVM? Most would agree that Linux (Ubuntu or other) will give you much better results in performance and stability to run an App Server like GlassFish in any environment.