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

Correcting rate_limit message format for application/json solves #9 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

janani-vijayan
Copy link

Rate-limit response for application/json throws below error which leads to constant restart of the application.

*** Exception NoMethodError in application (undefined method `each' for "[\"Rate Limit Exceeded\"]":String) (process 18532, thread #<Thread:0x0000000190a640>): from /<application>/vendor/ruby/2.1.0/gems/rack-1.6.11/lib/rack/body_proxy.rb:31:in `each' from /<application>/vendor/ruby/2.1.0/gems/rack-1.6.11/lib/rack/body_proxy.rb:31:in `each' from /<application>/vendor/ruby/2.1.0/gems/rack-1.6.11/lib/rack/body_proxy.rb:31:in `each' from /<application>/vendor/ruby/2.1.0/gems/rack-1.6.11/lib/rack/body_proxy.rb:31:in `each' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/rack/request_handler.rb:144:in `process_request' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_request_handler.rb:520:in `accept_and_process_next_request' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/utils.rb:470:in `safe_fork' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb:180:in `start' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/rack/application_spawner.rb:129:in `start' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' from /usr/local/lib/ruby/gems/2.1.0/gems/passenger-3.0.21/helper-scripts/passenger-spawn-server:99:in `<main>'

@janani-vijayan janani-vijayan changed the title Correcting rate_limit message format for application/json Correcting rate_limit message format for application/json solves #9 Nov 1, 2019
@janani-vijayan
Copy link
Author

Solves #9

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

Successfully merging this pull request may close these issues.

1 participant