Comments (7)
From davidnaffis on April 19, 2008 08:30:43
Is there a temporary workaround until it's fixed in Rails?
from passenger.
From honglilai on April 19, 2008 08:38:00
There's no workaround at the moment.
from passenger.
From honglilai on April 20, 2008 02:50:16
Labels: -Priority-Medium Priority-High
from passenger.
From [email protected] on April 21, 2008 19:38:21
I'm not sure I agree. The boot.rb file defines RAILS_ROOT at the very top, one of the first things Rails.boot
does is to call the preinitialize method. That method itself even uses RAILS_ROOT, even VendorBoot.run uses
it as a value in the require. So by the time Rails::Initializer.run is called RAILS_ROOT is very well defined and
should not error out.
This seems to only be a problem with Passenger. I really think this is something in the way framework_spawner.rb is working. In fact, if look at the code, you are only accounting for RAILS_ROOT in the
application spawner. I would imagine that the rails framework is going to rely more and more on RAILS_ROOT
being defined, so I think if Passenger is going to sidestep the boot.rb process which does that well ahead of
time, then you need to do so in both your application and your framework spawner. Does that sound
reasonable?
from passenger.
From [email protected] on April 21, 2008 19:55:03
For instance, this hack works for me. http://github.com/metaskills/passenger/commit/69afcd75425a89c9d17d1fc40c0a7571d6bd547c Sorry, I'm not on the rspec bandwagon, or I would have written some tests.
from passenger.
From honglilai on April 22, 2008 03:10:44
Hi metaskills.
The reason why FrameworkSpawner exists, is to reduce memory usage and startup time.
The idea is that the FrameworkSpawner loads all Rails framework code. Then, whenever
an application needs to be spawned, the FrameworkSpawner creates a child process,
which already contains the Rails framework. This removes the need to load the Rails
framework over and over, which reduces startup time. And because the child process
shares most memory with its parent process, memory usage is reduced.
However, any application, i.e. with any application root, may be spawned using a
FrameworkSpawner. Your change works in the case when Apache only serves a single
application, but will fail if it serves multiple applications (assuming that they
aren't all vendoring Rails, in which case your solution would work).
I think the reduced startup time and reduced memory usage is a pretty good reason to
make Rails rely less on RAILS_ROOT being available during boot. So I think it would
be better to patch Rails instead.
from passenger.
From honglilai on May 01, 2008 12:13:12
Fixed in the development version (git repository).
Status: Fixed
Labels: Milestone-1.1.0
from passenger.
Related Issues (20)
- passenger-install-nginx-module is running after installation as a dynamic module HOT 8
- Security update without published advisory HOT 2
- Memory leak HOT 3
- Crash when starting Ruby 3.3.0 Rails 7 application HOT 3
- Disable secure headers option for GLS HOT 1
- HTTP3/QUIC breaks passenger Python apps ( Nginx + HTTP3 + Passenger ) HOT 2
- Cannot build passenger nginx dynamic module HOT 1
- Out of memory leads to passenger shutdown and ensuing 502 error on nginx HOT 3
- Out of memory leads to passenger shutdown and ensuing 502 error on nginx HOT 1
- Cannot upgrade to 1.24.0-1: unmet dependencies HOT 2
- Cannot find nginx module on Amazon Linux 2023 HOT 1
- Cannot install passenger-6.0.20-1.el9.x86_64.rpm on CentOS 9 Stream with Ruby 3.3 HOT 2
- Requests intermittently result in 500, directory in /tmp not found HOT 2
- Better cooperation with Kubernetes zero-downtime restarts
- Error with Rack prevents editing rails production credentials
- params are empty upon proper form submission HOT 1
- Packaging of unmaintained dependency: http-parser HOT 2
- The passenger spawns more processes than are allocated to it
- SecurityUpdateCheck fails when using builtin engine HOT 1
- Lacking rubyext-ruby-3.2.2-x86_64-linux.tar.gz from Release 6.0.20. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passenger.