Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9196077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:46:17+00:00 2026-06-17T21:46:17+00:00

How do I increase the number of sockets that may be opened on ubuntu

  • 0

How do I increase the number of sockets that may be opened on ubuntu when using Mina 2.0.8? Once my server reaches around ~1700 connections, I get this in my logs:

2013-01-24 04:21:49,465 [NioSocketAcceptor-1] WARN  o.a.m.util.DefaultExceptionMonitor - Unexpected exception.
java.io.IOException: Too many open files
    at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) ~[na:1.6.0_20]
    at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:163) ~[na:1.6.0_20]
    at org.apache.mina.transport.socket.nio.NioSocketAcceptor.accept(NioSocketAcceptor.java:159) ~[mina-core-2.0.8-SNAPSHOT.jar:na]
    at org.apache.mina.transport.socket.nio.NioSocketAcceptor.accept(NioSocketAcceptor.java:50) ~[mina-core-2.0.8-SNAPSHOT.jar:na]
    at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.processHandles(AbstractPollingIoAcceptor.java:506) ~[mina-core-2.0.8-SNAPSHOT.jar:na]
    at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPollingIoAcceptor.java:447) ~[mina-core-2.0.8-SNAPSHOT.jar:na]
    at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.8-SNAPSHOT.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.6.0_20]
    at java.lang.Thread.run(Thread.java:636) [na:1.6.0_20]

How is this possible when my file handles are set to a max of 331278 for hard and soft?
Running “ulimit -n” reports

331287

and running “sysctl fs.file-nr” reports

fs.file-nr = 1728   0   331287

Contents of /etc/security/limits.conf file

* hard nofile 331287
* soft nofile 331287
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:46:18+00:00Added an answer on June 17, 2026 at 9:46 pm

    Two things seem to have fixed the issue I was having above:

    1. Increasing the file handles for the “root” user specifically since its not included when using “*” in limits.conf.

    2. Editing my init.d script to include force setting the ulimit for the process being created. There is apparently a known issue in Ubuntu dealing with process daemon file handles. This link has the details: http://www.jayway.com/2012/02/11/how-to-really-fix-the-too-many-open-files-problem-for-tomcat-in-ubuntu/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the below code in order to increase the number of results that
I'd like to increase number of concurrent shells in PowerShell V2.I tried using the
I don't get what is that? It's id which auto increase number?
Is the anyway to increase the number of loops a Parallel.For will do once
I need to create backup folders that increase in number. But I need to
I am using the mousewheel in jquery to increase the number of a div,
I can increase the number of Worker Role (WR) instances directly from Java using
Is it possible to increase the number of log entries that google app engine
I have input text and I want to increase the number that is inside
I'm trying to increase the number of items shown in the Run MRU list.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.