Bitbucket Server cannot create to new connections due to "No buffer space available (maximum connections reached?)"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Bitbucket Server cannot open new sockets.

The following appears in the atlassian-bitbucket.log:

ERROR [Caesium-1-4]  c.a.scheduler.core.JobLauncher Scheduled job with ID '<job id>' failed
java.lang.IllegalStateException: org.apache.http.nio.reactor.IOReactorException: Failure opening selector
Caused by: org.apache.http.nio.reactor.IOReactorException: Failure opening selector
Caused by: java.io.IOException: Unable to establish loopback connection
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): bind

Cause

Bitbucket Server can't create any new sockets when it's trying to talk to other services (e.g. database or external user directory). This could be caused by another application on the same server as Bitbucket Server and exhausting the available sockets.

The following command can be used to report the sockets in use:

netstat -n

Resolution

There are various options to resolve this:

  • identify what's using the sockets and reduce the numbers
  • increase the number of available sockets


Last modified on Jun 20, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.