OutOfMemoryError and ssh?

161 views
Skip to first unread message

ma...@mansandersson.se

unread,
Jun 17, 2014, 5:30:36 AM6/17/14
to git...@googlegroups.com
This error report is very vague, so vague I don't even know if it is an error or just something in my setup. So please bear with me.

I'm runnig gitblit 1.5.1 on windows server 2012. Most connections are done over HTTPS with LDAP authentication, except for a build server which uses SSH with certificate authentication. Today I started to receive HTTP 500 errors when trying to push over HTTPS. The stdout log states it's an OutOfMemoryError (see error message below). Checking the process memory usage it is hovering around 590MB (normally 330MB). When trying to end the server process gracefully it wont stop, i.e. something is probably blocking the server.

Just before the error started to appear I can see that the SSH server part also threw an Exception, which it normally doesn't. Can it have something to do with the OutOfMemoryError I received later on?

2014-06-17 07:32:12 [INFO ] creating ssh session from /192.168.1.198:64884
2014-06-17 07:42:12 [WARN ] Exception caught
java.io.IOException: The specified network name is no longer available.

    at sun.nio.ch.Iocp.translateErrorToIOException(Unknown Source)
    at sun.nio.ch.Iocp.access$700(Unknown Source)
    at sun.nio.ch.Iocp$EventHandlerTask.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
2014-06-17 07:42:12 [INFO ] closed ssh session from /192.168.1.198:64884
2014-06-17 07:53:15 [WARN ] Failed login attempt for useraccount, invalid credentials from 192.168.1.194
2014-06-17 07:53:16 [WARN ] Error for /r/myRepo.git/info/refs
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Unknown Source)
    at com.unboundid.ldap.sdk.LDAPConnectionInternals.<init>(LDAPConnectionInternals.java:136)
    at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:711)
    at com.unboundid.ldap.sdk.LDAPConnection.connect(LDAPConnection.java:654)
    at com.gitblit.auth.LdapAuthProvider.getLdapConnection(LdapAuthProvider.java:209)
    at com.gitblit.auth.LdapAuthProvider.authenticate(LdapAuthProvider.java:298)
    at com.gitblit.manager.AuthenticationManager.authenticate(AuthenticationManager.java:386)
    at com.gitblit.manager.AuthenticationManager.authenticate(AuthenticationManager.java:278)
    at com.gitblit.servlet.GitFilter.getUser(GitFilter.java:123)
    at com.gitblit.servlet.AccessRestrictionFilter.doFilter(AccessRestrictionFilter.java:154)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:462)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
    at java.lang.Thread.run(Unknown Source)

ma...@mansandersson.se

unread,
Jun 17, 2014, 5:33:01 AM6/17/14
to git...@googlegroups.com
Hmm, maybe should have read the gitblit 1.6.0 release notes first. Could it be that ticket 89 (https://dev.gitblit.com/tickets/gitblit.git/89) solves this issue?

James Moger

unread,
Jun 17, 2014, 7:30:00 AM6/17/14
to git...@googlegroups.com
Yes, indeed.  Give 1.6.0 a go.  Hopefully that will behave better.

-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.

Gil Collins

unread,
Jan 13, 2015, 2:19:50 PM1/13/15
to git...@googlegroups.com
We're just starting to see this same issue on Windows using version 1.6.2

Windows Server 2008 R2  64bit  has 3GB alocated to Gitblit
git.packedGitOpenFiles = 2048 git.packedGitLimit = 1024m git.packedGitWindowSize = 64k

Would updating the jsch and sshd jars help with this issue?
Currently we have to restart the server daily.

Thank you for your help.

James Moger

unread,
Jan 15, 2015, 11:10:32 AM1/15/15
to git...@googlegroups.com
Maybe so.  I have never run into the reported issue - but my uses are modest.

-J
Reply all
Reply to author
Forward
0 new messages