My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1883: Server out of memory
2 people starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  May 2013


Sign in to add a comment
 
Reported by peterbru...@gmail.com, Apr 23, 2013
Affected Version:

What steps will reproduce the problem?
1. Test server was left over night, in the morning I check and CPU usage was 1% and memory usage 950MB
2. Browser was still open, I clicked on All->Open. Cpu usage went to 25% and memory usage stayed around the same 
3. Can only be resolved by restarting the server

What is the expected output? What do you see instead?
I would expect to see my open item. The server should be able to function with the 1024MB of memory allocated to it and not run out of memory. No user activity expect for jenkins polling for changes and the gerrit trigger.

Please provide any additional information below.

This is a test server that has three small projects (50MB-75MB each) and has 1 open merge. Installation is on a Windows XP running under Tomcat6 behind Apache using http authentication

Apache error.log:
[Wed Apr 24 08:57:52 2013] [error] [client 192.168.3.191] (OS 10060)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.  : proxy: error reading status line from remote server 127.0.0.1:8081, referer: http://gerrit.mit.com.sg/
[Wed Apr 24 08:57:52 2013] [error] [client 192.168.3.191] proxy: Error reading from remote server returned by /, referer: http://gerrit.mit.com.sg/

Tomcat log:
Apr 24, 2013 8:53:03 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: Java heap space
Apr 24, 2013 9:00:43 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.OutOfMemoryError: Java heap space

sshd_log, around 18:00 the times reported were still 0ms:
[2013-04-23 20:22:15,200 +0800] 78a9e424 jenkins a/1000002 gerrit.ls-projects 16155ms 957469ms killed
[2013-04-23 21:51:49,860 +0800] 3817ec70 jenkins a/1000002 null.ls-projects 0ms 2387395ms killed



Apr 23, 2013
#1 peterbru...@gmail.com
Addition info:
I have set the memory usage for tomcat to "--JvmMs 512 --JvmMx 1024"
Version used: 2.6-rc0-349-g04621a7

May 2, 2013
#2 peterbru...@gmail.com
I have set the memory usage for tomcat to "--JvmMs 512 --JvmMx 1536" now and that seems to have solved my problem. 
May 6, 2013
#3 sop@google.com
Trying to run a very memory-constrained Gerrit probably requires some additional settings to reduce the sizes of the caches, etc to prevent the server from hanging onto any data. This will slow things down for users, but hey, it uses less memory.

Configuring the caches is documented in the system settings. But I'm happy to hear you found a JVM heap size that worked for your configuration.
Status: Invalid
May 12, 2013
#4 peterbru...@gmail.com
I am actually not saying I am trying to run a very memory constrained Gerrit. I just saw somewhere that somebody used this setting for tomcat. I didn't find any other recommendations and I am just testing it with one user (me) and jenkins... and it runs out of memory over time. That just seems a bit odd..

Actually, I noticed that whenever I had some issues relating to SSH keys (when I was setting up Jenkins slaves or so) Gerrit would very quickly become unresponsive. I would not be able to connect in any way and only a restart would fix it. It seems like ssh sessions that have an ssh key problem do not get cleared properly and cause some memory or other problems.
Sign in to add a comment

Powered by Google Project Hosting