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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:06:37+00:00 2026-05-25T22:06:37+00:00

Background: I had an issue with my Rails server recently where it would stop

  • 0

Background:

I had an issue with my Rails server recently where it would stop responding, requiring a bounce to get it back up and running. This issue was due to a controller that does some forking upon receiving a POST, to do some heavy-weight concurrent processing — server response time kept increasing until the server completely stopped responding. I’m pretty sure I have fixed that issue (DB connections copied upon fork weren’t getting closed in child processes), but it would be great to authoritatively test that.

Question:

Is there a way to monitor open file descriptors from inside my Rails app? It’s running on Linux, so I’ve been mucking around with the proc filesystem and the lsof command to observe the open file descriptors; this is messy, because it only gives you a snapshot of the current processes. Ideally I would like to print the open file descriptors in the parent and child processes before, during, and after the processing, to ensure that file descriptors don’t stay open past their welcome.

  • 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-25T22:06:38+00:00Added an answer on May 25, 2026 at 10:06 pm

    One method to consider (probably the simplest) is using a background worker of some sort, such as with Workling, and making it run lsof in intervals, and getting output using syntax:

    `lsof | grep something` # shell command example.
    

    Programs like lsof can really hurt performance if run too frequently. Perhaps every 10s to 30s. Perhaps down to maybe 5s, but that’s really pushing it. I’m assuming you have a dedicated server or a beasty virtual machine.

    In your background worker, you can store these command results into a variable, or grep it down to what you’re really looking for (as demonstrated), and access/manipulate the data as you please.

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

Sidebar

Related Questions

Recently, my friend helped me fix a background overlay problem. I had an issue
I have never had an issue with putting th { background: #900; } as
I have had this issue before and can't remember if and how I fixed
Background: today, an issue arose while using SQL Server Reporting Services. It seems that
First off, there's a bit of background to this issue available on my blog:
Had anyone experienced that issue before? What would be a good solution? I'm using
I had written this code out using Adobe CS3 and have recently upgraded to
Have you ever had alternating background colors in a Jasper report and then exported
Background WCF Stack, Data Access Implemented in Entity Framework, Simple ASP.NET Front End This
Some background: I setup six blogs this week, all using Wordpress 2.92, installed with

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.