Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

There was an exception - RuntimeError(No async task available!) #11

Open
deepj opened this issue Jan 31, 2020 · 2 comments
Open

There was an exception - RuntimeError(No async task available!) #11

deepj opened this issue Jan 31, 2020 · 2 comments

Comments

@deepj
Copy link

deepj commented Jan 31, 2020

When I added the latest falcon and async-postgres in my Rails application so I got this error while a first request:

There was an exception - RuntimeError(No async task available!)
~/.gem/ruby/2.7.0/gems/async-1.24.1/lib/async/task.rb:183:in `current'
~/.gem/ruby/2.7.0/gems/async-postgres-0.1.0/lib/async/postgres/pool.rb:30:in `initialize'
~/.gem/ruby/2.7.0/gems/async-postgres-0.1.0/lib/async/postgres.rb:29:in `new'
~/.gem/ruby/2.7.0/gems/async-postgres-0.1.0/lib/async/postgres.rb:29:in `connect'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:46:in `postgresql_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:889:in `new_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:933:in `checkout_new_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:912:in `try_to_checkout_new_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:873:in `acquire_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:595:in `checkout'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:439:in `connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1121:in `retrieve_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_handling.rb:238:in `retrieve_connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_handling.rb:206:in `connection'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/model_schema.rb:340:in `table_exists?'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/attribute_methods/primary_key.rb:92:in `get_primary_key'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/attribute_methods/primary_key.rb:80:in `reset_primary_key'
~/.gem/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/attribute_methods/primary_key.rb:68:in `primary_key'
~/.gem/ruby/2.7.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:17:in `get'
~/.gem/ruby/2.7.0/gems/devise-4.7.1/lib/devise/models/authenticatable.rb:237:in `serialize_from_session'
~/.gem/ruby/2.7.0/gems/devise-4.7.1/lib/devise.rb:485:in `block (2 levels) in configure_warden!'
~/.gem/ruby/2.7.0/gems/warden-1.2.8/lib/warden/session_serializer.rb:35:in `fetch'
~/.gem/ruby/2.7.0/gems/warden-1.2.8/lib/warden/proxy.rb:224:in `user'
~/app/app/channels/application_cable/connection.rb:15:in `find_verified_user'
~/app/app/channels/application_cable/connection.rb:8:in `connect'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/connection/base.rb:171:in `handle_open'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker.rb:59:in `block in invoke'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker.rb:41:in `block in work'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker/active_record_connection_management.rb:16:in `block in with_database_connections'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/connection/tagged_logger_proxy.rb:24:in `block in tag'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/tagged_logging.rb:80:in `block in tagged'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/tagged_logging.rb:28:in `tagged'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/tagged_logging.rb:80:in `tagged'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/connection/tagged_logger_proxy.rb:24:in `tag'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker/active_record_connection_management.rb:16:in `with_database_connections'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/engine.rb:62:in `block (4 levels) in <class:Engine>'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/execution_wrapper.rb:88:in `wrap'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/engine.rb:57:in `block (3 levels) in <class:Engine>'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/callbacks.rb:121:in `instance_exec'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
~/.gem/ruby/2.7.0/gems/activesupport-6.0.2.1/lib/active_support/callbacks.rb:139:in `run_callbacks'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker.rb:40:in `work'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker.rb:58:in `invoke'
~/.gem/ruby/2.7.0/gems/actioncable-6.0.2.1/lib/action_cable/server/worker.rb:53:in `block in async_invoke'
~/.gem/ruby/2.7.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
~/.gem/ruby/2.7.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
~/.gem/ruby/2.7.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
~/.gem/ruby/2.7.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
~/.gem/ruby/2.7.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
~/.gem/ruby/2.7.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
@deepj
Copy link
Author

deepj commented Jan 31, 2020

Ah, I guess this is a duplicate of #5

@ioquatix
Copy link
Member

ioquatix commented Feb 1, 2020

Right now, this is only POC. Do not use it in a production rails app.

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

No branches or pull requests

2 participants