Gitblit crashing with heap space errors

401 views
Skip to first unread message

zolta...@gmail.com

unread,
Feb 9, 2015, 7:19:06 AM2/9/15
to git...@googlegroups.com
Hi,

We have a problem with our Gitblit server this morning reporting out of heap space errors. It seems to be happening after a large amount of branches were added to a repo (I'm not entirely sure if the two are related)

I've changed the startup options and given it a large amount of memory:

/usr/bin/java -Xms1g -Xmx5g -jar gitblit.jar --baseFolder data --dailyLogFile

After I did this, it spent a lot of time caching new commits then seemed to start, however, it's reporting heap space problems:

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.moxie.MxLauncher.main(MxLauncher.java:129)
Caused by: java.lang.OutOfMemoryError: Java heap space

How much heap space should I give it? 5g seems like quite a lot.

many thanks,

Zoltan Galgavolgyi

James Moger

unread,
Feb 9, 2015, 9:01:22 AM2/9/15
to git...@googlegroups.com
I agree 5g is quite a lot but that also depends on the size of your repos.

Things to consider trying:
1. git gc your repos
2. disabling commit cache (web.activityCacheDays = 0)
3. disable Lucene indexing (web.allowLuceneIndexing = false)

-J



--
You received this message because you are subscribed to the Google Groups "gitblit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitblit+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

zolta...@gmail.com

unread,
Feb 9, 2015, 9:47:58 AM2/9/15
to git...@googlegroups.com
Hi James,

Thanks for the suggestions. I ran gc earlier on the repos, this hadn't been done for a little while. I'll try the other two settings and see what happens.

thanks!

Zoltan
Reply all
Reply to author
Forward
0 new messages