Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preload_rails is too presumptuous: i.e. loads action_web_service when my environment.rb doesn't want it. #123

Closed
FooBarWidget opened this issue May 29, 2014 · 7 comments

Comments

@FooBarWidget
Copy link
Member

From mazdakr on April 16, 2008 16:22:50

Due to a conflict between and action_web_service and some custom code, we have disabled it in our
code, but the preload_rails function in framework_spawner loads every component of Rails!

Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=22

@FooBarWidget
Copy link
Member Author

From honglilai on April 16, 2008 08:40:57

This is intended, in order to speed up startup time as well as to reduce memory usage
if there are a multiple Rails applications.

We could provide a config option in the future. But as a temporary workaround, you
can vendor your Rails framework. That'll make Passenger skip the framework spawner.

By the way, I'm curious as to what code conflicts with ActionWebService.

@FooBarWidget
Copy link
Member Author

From honglilai on May 07, 2008 14:32:16

The latest development version (git repository) should solve your problem. By setting
"RailsSpawnMethod" to "conservative", your application should work fine.

But we recommend you to read the manual (in which RailsSpawnMethod is documented).
There are significant benefits to using the default "smart" spawning method (i.e. as
opposed to "conservative"), namely as lower startup time and reduced memory usage.
Although you don't have to, you should consider making your application compatible.

Status: Fixed
Labels: Milestone-1.1.0

@FooBarWidget
Copy link
Member Author

From mazdakr on May 10, 2008 18:24:10

Perhaps we can have a RailsExcludeComponents a, b, c option.

SOAP4r conflicts.

@FooBarWidget
Copy link
Member Author

From honglilai on May 11, 2008 01:01:51

You can use conservative spawning. That option solves your problem completely.

@FooBarWidget
Copy link
Member Author

From mazdakr on May 12, 2008 06:39:39

I realize that. However, to take advantage of the "optimized" mode, it would be nice to add that option. I realize
adding one more option means having to maintain that option, but since it's a feature that Rails already offers in
its environment.rb, it would be a nice addition to ModRails. I can help with coming up with a spec if you wish.

@FooBarWidget
Copy link
Member Author

From honglilai on May 12, 2008 07:08:40

I don't know, this sounds too much like a corner case. Wouldn't it be easier for you
to adapt your custom code appropriately?

@FooBarWidget
Copy link
Member Author

From mazdakr on May 13, 2008 07:26:01

It's no problem. Most people don't need ActiveResource for example and it would save a bunch of memory
not to have to load it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant