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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:50:13+00:00 2026-06-05T19:50:13+00:00

Using Rails 3.0.7, REE 1.8.7. I want to run code (specifically, Garbage Collection) in

  • 0

Using Rails 3.0.7, REE 1.8.7.

I want to run code (specifically, Garbage Collection) in Rails after the response has been sent to the browser.

Is there a way to patch into Rails/Rack/something so that I can call GC.start right after the response is sent to the browser from the controller?

*Note: This is not a situation where I want to use delayed_job or resque. I am aware of those tools already and they are not appropriate for this use case.*

  • 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-05T19:50:15+00:00Added an answer on June 5, 2026 at 7:50 pm

    This one-line patch to passenger allows you to run GC between requests. After implementing it, we saw our GC execution time (as reported by NewRelic) drop by about 40%. Individual results may vary. 🙂

    Thanks to this post.

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

Sidebar

Related Questions

Using Rails 3.1.3 and Ruby 1.9.3. I want to give the user a list
I'm using Rails 3.0.3 with REE ( Ruby 1.8.7 ) and gem 'mysql2', '0.2.6'
Using Rails 3.1.3 with Devise 1.5.3. My app has accounts and users. Each account
Environment is REE(2011.12) on rvm, rspec 2.8.0, rails 3.0.6, and pg 0.13.2. Using PostgreSQL
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using rails 2. I want a link to the current page (whatever it is)
Using Rails 3.0.9, I'm trying to redirect after a post to the create method
I have some production Rails 2 apps. I want to start using Rails 3
Using Rails 3.0, I have a small bit of code that I seem to
Using Rails 3 I am consuming an XML feed generated in drupal or something.

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.