Job exception: timeout expired


(hosna) #1

ّI have so many of these errors in my log. I don’t know what’s exactly the problem.

/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/pg-0.21.0/lib/pg.rb:56:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/pg-0.21.0/lib/pg.rb:56:in `new'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/pg-0.21.0/lib/pg.rb:56:in `connect'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:684:in `connect'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:215:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `new'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:809:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:832:in `try_to_checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:793:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:521:in `checkout'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:380:in `connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1008:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:90:in `connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/relation/delegation.rb:46:in `connection'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/relation.rb:525:in `alias_tracker'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/association_scope.rb:26:in `scope'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/association_scope.rb:7:in `scope'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/association.rb:91:in `association_scope'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/association.rb:80:in `scope'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/collection_association.rb:288:in `scope'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/collection_proxy.rb:960:in `scope'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/associations/collection_proxy.rb:1130:in `where'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.2.0/lib/active_record/relation/finder_methods.rb:81:in `find_by'
/var/www/discourse/app/models/user.rb:558:in `visit_record_for'
/var/www/discourse/app/models/user.rb:562:in `update_visit_record!'
/var/www/discourse/app/models/user.rb:1230:in `update_previous_visit'
/var/www/discourse/app/models/user.rb:600:in `update_last_seen!'
/var/www/discourse/lib/auth/default_current_user_provider.rb:81:in `block in current_user'
/var/www/discourse/lib/scheduler/defer.rb:70:in `block in do_work'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:68:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:59:in `block (2 levels) in start_thread'

(Rafael dos Santos Silva) #2

Can you please try a rebuild?

cd /var/discourse
./launcher rebuild app

(hosna) #3

rebuild didnt fix the problem.

this is also another error that frequently is reported:

/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `new'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/pg-1.0.0/lib/pg.rb:56:in `connect'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:684:in `connect'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:215:in `initialize'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `new'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:809:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:832:in `try_to_checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:793:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:521:in `checkout'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:380:in `connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1008:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:90:in `connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/app/models/topic_view_item.rb:22:in `add'
/var/www/discourse/app/controllers/topics_controller.rb:746:in `block in track_visit_to_topic'
/var/www/discourse/lib/scheduler/defer.rb:70:in `block in do_work'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.5/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:68:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:59:in `block (2 levels) in start_thread'