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 3407818
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:47:52+00:00 2026-05-18T05:47:52+00:00

We hit a strange issue on one of customers servers, where Java encounters Too

  • 0

We hit a strange issue on one of customers servers, where Java encounters “Too many files”,

Checking the descriptors via lsof produces a large list of “sock” descriptors with “can’t identify protocol”.

I suspect it happens due to sockets that opened for too much time, but as our thread dump contains a lot of them, I have no clear idea who exactly the culprit.

Is there any good method to detect which threads exactly open these sockets?

Thanks.

  • 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-05-18T05:47:53+00:00Added an answer on May 18, 2026 at 5:47 am

    Is there any good method to detect which threads exactly open these sockets?

    Not the threads per se.

    One approach is to run the application using a profiler. This could well find the problem even if you cannot exactly reproduce the customer’s problem. (@SyBer reports that the YourKit profiler has specific support for finding socket leaks … see comment.)

    A second approach is to tweak your test platform by using ulimit to REDUCE the number of open files allowed. This may make it easier to reproduce the “too many files open” scenario in your test environment.

    Finally, I’d recommend “grepping” your codebase to find all places where socket objects are created. Then examine them all to make sure they use correctly try / finally blocks to ensure that the sockets are always closed.

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

Sidebar

Related Questions

I'm currently writing a Rails app, and hit a somewhat strange quirk. I have
Is there a performance hit if you use one data type for your primary
I have this very strange issue with my MVC 2 project. Often times, I'll
I was working on a program today and hit this strange bug. I had
I'm facing the same issue, while trying for cross-domain request. Situation is strange, my
I am seeing a very strange problem on one of my production boxes. We
I encountered a strange problem today. Whenever i put a breakpoint in one of
I'm having a seemingly strange issue with my android app. Whether I call append
I've run into a really strange issue with my rails/prawn code. I'm generating a
I'm getting strange navigation bar behaviour, for example when I hit back button the

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.