java.lang.OutOfMemoryError: Java heap space

292 views
Skip to first unread message

Guy Levkowitz

unread,
Nov 1, 2021, 7:35:51 AM11/1/21
to Repo and Gerrit Discussion
hi 
We have gerrit server 3.2.3  we get :
java.lang.OutOfMemoryError: Java heap space

and the server got stuck (crash) - is there something that can be done to avoid future cases like this ? 


thanks 

Guy


Luca Milanesio

unread,
Nov 1, 2021, 8:09:28 AM11/1/21
to Repo and Gerrit Discussion, Luca Milanesio, Guy Levkowitz
You need to enable the JVM GC log [1] and see why the heap is collapsing. Does that happen on a regular basis?





thanks 

Guy



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/6e4794ae-a475-41fe-9a0f-c22d607c83ean%40googlegroups.com.

Martin Fick

unread,
Nov 1, 2021, 10:25:27 AM11/1/21
to Guy Levkowitz, Repo and Gerrit Discussion
You can increase the heap size in gerrit.config using
container.heapLimit
https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#container

-Martin

--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

Guy Levkowitz

unread,
Nov 3, 2021, 3:48:32 AM11/3/21
to Repo and Gerrit Discussion
Does that happen on a regular basis   - No 
will check the option of increase the heap size in gerrit.config using.

is there any suggestion for configure the heapLimit  ? 
Machine Memory and more  ? 

container.heapLimit
ב-יום שני, 1 בנובמבר 2021 בשעה 16:25:27 UTC+2, MartinFick כתב/ה:

luca.mi...@gmail.com

unread,
Nov 3, 2021, 4:09:09 AM11/3/21
to Repo and Gerrit Discussion, Guy Levkowitz


Sent from my iPhone

On 3 Nov 2021, at 07:48, Guy Levkowitz <sil...@gmail.com> wrote:


Does that happen on a regular basis   - No 
will check the option of increase the heap size in gerrit.config using.

is there any suggestion for configure the heapLimit  ? 
Machine Memory and more  ? 

You need to enable the JVM GC logs to understand what is the problem with the current heap size.

Rising to an arbitrary value won’t help unless you know how much you really need or what is the issue.

There are cases where the problem isn’t actually the size but rather how it is allocated and used (e.g. humongous objects) and therefore the solution could be different.

HTH

Luca


container.heapLimit
ב-יום שני, 1 בנובמבר 2021 בשעה 16:25:27 UTC+2, MartinFick כתב/ה:
On 2021-11-01 05:35, Guy Levkowitz wrote:
> hi
> We have gerrit server 3.2.3 we get :
> java.lang.OutOfMemoryError: Java heap space
>
> and the server got stuck (crash) - is there something that can be done
> to avoid future cases like this ?

You can increase the heap size in gerrit.config using
container.heapLimit
https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#container

-Martin

--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages