Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316622

Change subject: Enable jvm heap log to debug gerrit slowing down
......................................................................

Enable jvm heap log to debug gerrit slowing down

This enables the jvm heap log to see if jvm gc is causing gerrit's
slowness.

Bug: T148478
Change-Id: Ia7cdde9140bf1739e05ca885814466b82684e00c
---
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/gerrit.config.erb
A modules/gerrit/templates/gerrit_head_log.erb
3 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/316622/1

diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 9f35328..475d666 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -102,6 +102,13 @@
         require => File['/var/lib/gerrit2/review_site/etc'],
     }
 
+    file { '/var/log/gerrit/gerrit_heap_log':
+        content => template('gerrit/gerrit_heap_log.erb'),
+        owner   => 'gerrit2',
+        group   => 'gerrit2',
+        mode    => '0660',
+    }
+
     if $ssh_host_key != undef {
         file { '/var/lib/gerrit2/review_site/etc/ssh_host_key':
             content => secret("gerrit/${ssh_host_key}"),
diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index 07d85e3..0cf3add 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -34,7 +34,7 @@
 [container]
     user = gerrit2
     javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre
-    javaOptions = 
-Dlog4j.configuration=file:///var/lib/gerrit2/review_site/etc/log4j.properties
+    javaOptions = -XX:+HeapDumpOnOutOfMemoryError 
-XX:HeapDumpPath=file:///var/lib/gerrit2/review_site/etc/gerrit_heap_log 
-Dlog4j.configuration=file:///var/lib/gerrit2/review_site/etc/log4j.properties
     heapLimit = <%= @heap_limit %>
     slave = <%= @slave %>
 [sshd]
diff --git a/modules/gerrit/templates/gerrit_head_log.erb 
b/modules/gerrit/templates/gerrit_head_log.erb
new file mode 100644
index 0000000..111eaa4
--- /dev/null
+++ b/modules/gerrit/templates/gerrit_head_log.erb
@@ -0,0 +1,2 @@
+# jvm heap log for gerrit
+

-- 
To view, visit https://gerrit.wikimedia.org/r/316622
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7cdde9140bf1739e05ca885814466b82684e00c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to