Problem with Mephisto blog and Passenger

I seem to be getting a SystemStackError exception when running
Mephisto under Passenger. The trace I get has 149 lines of backtrace,
which seems large, but when looking at it I don’t see any loops nor
other issues. I think this may actually be hitting a system limit.

So, the question is, how do I work around this? Can the stack size be
increased using some Passenger knob I was thus far unable to discover,
or is this a compile-time option I need to tweak?

Thanks,
–Michael

M Graff wrote:

I seem to be getting a SystemStackError exception when running
Mephisto under Passenger. The trace I get has 149 lines of backtrace,
which seems large, but when looking at it I don’t see any loops nor
other issues. I think this may actually be hitting a system limit.

So, the question is, how do I work around this? Can the stack size be
increased using some Passenger knob I was thus far unable to discover,
or is this a compile-time option I need to tweak?

Before tweaking Passenger, make sure everything else is OK. Perhaps put
the trace on Pastie or something so we can see it?

Thanks,
–Michael

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Michael,

I have been using Mephisto with Passenger and its working great.Try
providing the stack trace.

Thanks,
Kilari.

OK, sorry for the spam here :slight_smile:

This is when attempting to post a new article, but it also happens in
liquid templates from time to time.

Posting comments works, logging in does as well. This is using a
slightly themed but otherwise stock template in terms of what is in
the template files.

SystemStackError (stack level too deep):
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in
retrieve_connection' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:inconnection’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2237:in
quote_bound_value' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2197:inreplace_bind_variables’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2197:in
gsub' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2197:inreplace_bind_variables’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2186:in
sanitize_sql_array' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2079:insanitize_sql’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1441:in
merge_conditions' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1439:ineach’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1439:in
merge_conditions' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1742:inadd_conditions!’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/calculations.rb:200:in
construct_calculation_sql' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/calculations.rb:225:inexecute_simple_calculation’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/calculations.rb:126:in
calculate' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/calculations.rb:122:incatch’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/calculations.rb:122:in
calculate' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/calculations.rb:48:incount’
/app/models/assigned_section.rb:10:in
check_for_dupe_article_and_section' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in
evaluate_method' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:166:incall’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90:in
run' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90:ineach’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90:in
send' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90:inrun’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:277:in
run_callbacks' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/validations.rb:1033:invalid_without_callbacks?’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/callbacks.rb:286:in
valid?' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/validations.rb:1008:insave_without_dirty’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/dirty.rb:79:in
save_without_transactions' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:179:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:179:in
with_transaction_returning_status' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:550:intransaction’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in
transaction' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:138:intransaction’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:178:in
with_transaction_returning_status' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:146:insave’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:158:in
rollback_active_record_state!' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:146:insave’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:237:in
create' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:405:increate_record’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:423:in
add_record_to_target_with_callbacks' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:405:increate_record’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:235:in
create' /app/models/article.rb:214:insave_assigned_sections’
/app/models/article.rb:214:in each' /app/models/article.rb:214:insave_assigned_sections’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in
send' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:inevaluate_method’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:166:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:93:inrun’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:92:in
each' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:92:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:92:in
run' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:277:inrun_callbacks’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/callbacks.rb:315:in
callback' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/callbacks.rb:223:increate_or_update’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2383:in
save_without_validation' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/validations.rb:1009:insave_without_dirty’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/dirty.rb:79:in
save_without_transactions' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:179:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:179:in
with_transaction_returning_status' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:550:intransaction’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in
transaction' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:138:intransaction’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:178:in
with_transaction_returning_status' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:146:insave’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:158:in
rollback_active_record_state!' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:146:insave’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:237:in
create' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:405:increate_record’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:423:in
add_record_to_target_with_callbacks' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:405:increate_record’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb:235:in
create' /app/controllers/admin/articles_controller.rb:44:increate’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in
send' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:inperform_action_without_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:617:in
call_filters' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:638:inrun_before_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:206:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:206:inaround_proc’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:inevaluate_method’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:184:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:635:inrun_before_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:615:in
call_filters' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:638:inrun_before_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:206:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:206:inaround_proc’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:inevaluate_method’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:184:in
call' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:635:inrun_before_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:615:in
call_filters' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:638:inrun_before_filters’
/app/controllers/application.rb:111:in get_requests_are_readonly' /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:insend’
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in
evaluate_method' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:186:incall’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:635:in
run_before_filters' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:615:incall_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:610:in
perform_action_without_benchmark' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue’
/usr/pkg/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/rescue.rb:136:in
perform_action_without_caching' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:13:inpassenger_orig_perform_action’
/usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
cache' /usr/pkg/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:incache’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in
passenger_orig_perform_action' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/request_handler.rb:64:inperform_action’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
send' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:inprocess_without_filters’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
process_without_session_management_support' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:inprocess’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
process' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:inhandle_request’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
dispatch_unlocked' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:indispatch’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
synchronize' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:indispatch’
/usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
dispatch_cgi' /usr/pkg/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:indispatch’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/request_handler.rb:49:in
process_request' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_request_handler.rb:206:inmain_loop’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:376:in
start_request_handler' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:334:inhandle_spawn_application’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/utils.rb:182:in
safe_fork' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:332:inhandle_spawn_application’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in
__send__' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:inmain_loop’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:in
start_synchronously' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:162:instart’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:213:in
start' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:261:inspawn_rails_application’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb:126:in
lookup_or_add' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:255:inspawn_rails_application’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb:80:in
synchronize' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:254:in
spawn_rails_application' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:153:inspawn_application’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:286:in
handle_spawn_application' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:insend
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in
main_loop' /usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:instart_synchronously’
/usr/pkg/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:61

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs