Hi!
I currently have a problem with the external search.
I would like the search bar to be relative to the location,
But as soon as I activate external_search_in_use, and I put on “Geographical Search”, the search does not go anymore and the error message is displayed.
Do you know how to fix this?
Thank you.
Config parameter external_search_in_use: true
is only for hosted version, not opensource, as it requires different search engine “Zappy”, that is why your search stops working.
In opensource you can only use Sphinx, so you should leave external_search_in_use: false
Ok, so there is no way for me to have a localisation search ?
You can try following patch to enable location search:
https://patch-diff.githubusercontent.com/raw/sharetribe/sharetribe/pull/3256.patch
Apply it to your code:
wget https://patch-diff.githubusercontent.com/raw/sharetribe/sharetribe/pull/3256.patch
patch -p1 <3256.patch
Then rebuild sphinx index:
rake ts:rebuild
Restart your server and delayed jobs worker.
In admin settings then change search mode to “keyword and location”.
Ok thank you, i’ll try this asap !
It was working, but suddenly a crash come at the server start
Jun 02 16:14:33 ip-172-31-15-131 sharetri2[1167]: [ 2018-06-02 16:14:33.9947 2278/7fb0d030d700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/ubuntu/shar
Jun 02 16:14:33 ip-172-31-15-131 sharetri2[1167]: Error ID: 402d3fe4
Jun 02 16:14:34 ip-172-31-15-131 sharetri2[1167]: Error details saved to: /tmp/passenger-error-G2k77o.html
Jun 02 16:14:34 ip-172-31-15-131 sharetri2[1167]: Message from application: An error occurred while starting up the preloader: it did not write a startup response in time. Please read <a h
Jun 02 16:14:34 ip-172-31-15-131 sharetri2[1167]: <h2>Raw process output:</h2>
Jun 02 16:14:34 ip-172-31-15-131 sharetri2[1167]: (empty)
Jun 02 16:14:34 ip-172-31-15-131 sharetri2[1167]: [ 2018-06-02 16:14:34.2760 2278/7fb0c9aec700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning
Jun 02 16:14:34 ip-172-31-15-131 sharetri2[1167]: [ 2018-06-02 16:14:34.2767 2278/7fb0c9aec700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-2] Cannot checkout session because a spawning
Jun 02 16:14:35 ip-172-31-15-131 sharetri2[1167]: App 2377 stdout:
Jun 02 16:15:40 ip-172-31-15-131 sharetri2[1167]: App 2435 stdout:
Seems to be a timeout during some network request.
- Check full error details in production log and passenger error details from /tmp/passenger-error-G2k77o.html
- Ensure you have
external_search_in_use: false
in your config.yml for production env - Ensure you have Sphinx working:
RAILS_ENV=production rake ts:rebuild
I do step 2 and 3 and have this :
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: Error details saved to: /tmp/passenger-error-sKmEJ0.html
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: Message from application: An error occurred while starting up the preloader: it did not write a startup response in time. Please read <a h
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]:
Raw process output:
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: (empty)
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: [ 2018-06-04 10:10:45.7596 9923/7f2bd0d23700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: [ 2018-06-04 10:10:45.7602 9923/7f2bd0d23700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-2] Cannot checkout session because a spawning
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: [ 2018-06-04 10:10:45.8380 9923/7f2bd0d23700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-3] Cannot checkout session because a spawning
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: [ 2018-06-04 10:10:45.8385 9923/7f2bd0d23700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-4] Cannot checkout session because a spawning
Jun 04 10:10:45 ip-172-31-15-131 sharetri2[9737]: [ 2018-06-04 10:10:45.8391 9923/7f2bd0d23700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-5] Cannot checkout session because a spawning
Jun 04 10:10:46 ip-172-31-15-131 sharetri2[9737]: App 10079 stdout:
And here’s the log file :
We're sorry, but something went wrong.
The issue has been logged for investigation. Please try again later.
Technical details for the administrator of this website
Error:
Web application could not be started
Error ID:
b460830b
Details:
An error occurred while starting up the preloader: it did not write a startup response in time. Please read this article for more information about this problem.
Raw process output:
(empty)
System information:
Application root
/home/ubuntu/sharetribe
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
production
Ruby interpreter command
ruby
User and groups
uid=1000(ubuntu) gid=1000(ubuntu)
groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),110(lxd)
Environment variables
USER=ubuntu
_system_version=16.04
BUNDLER_VERSION=1.16.2
SHLVL=1
RUBYOPT=-rbundler/setup
HOME=/home/ubuntu
BUNDLER_ORIG_BUNDLER_VERSION=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
rvm_stored_umask=0022
rvm_user_install_flag=1
LOGNAME=ubuntu
rvm_bin_path=/home/ubuntu/.rvm/bin
_=/home/ubuntu/.rvm/gems/ruby-2.3.4/bin/bundle
RUBYLIB=/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/bundler-1.16.2/lib
IRBRC=/home/ubuntu/.rvm/rubies/ruby-2.3.4/.irbrc
RUBY_VERSION=ruby-2.3.4
PATH=/home/ubuntu/.rvm/gems/ruby-2.3.4/bin:/home/ubuntu/.rvm/gems/ruby-2.3.4@global/bin:/home/ubuntu/.rvm/rubies/ruby-2.3.4/bin:/home/ubuntu/.rvm/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
BUNDLER_ORIG_MANPATH=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLE_BIN_PATH=/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/bundler-1.16.2/exe/bundle
MY_RUBY_HOME=/home/ubuntu/.rvm/rubies/ruby-2.3.4
LANG=en_US.UTF-8
SHELL=/bin/bash
BUNDLER_ORIG_BUNDLE_BIN_PATH=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_BUNDLER_ORIG_MANPATH=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
BUNDLER_ORIG_RUBYOPT=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
rvm_prefix=/home/ubuntu
rvm_loaded_flag=1
GEM_HOME=/home/ubuntu/.rvm/gems/ruby-2.3.4
_system_type=Linux
BUNDLER_ORIG_RB_USER_INSTALL=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL
rvm_version=1.29.3 (master)
BUNDLE_GEMFILE=/home/ubuntu/sharetribe/Gemfile
_system_arch=x86_64
BUNDLER_ORIG_GEM_HOME=/home/ubuntu/.rvm/gems/ruby-2.3.4
That gives not much details, I see no exception backtraces.
- Is your passenger module built and using the same ruby version as your application?
- Does standalone server start normally in production mode with
RAILS_ENV=production rails s
? - Does rails console work with
rails c production
?
-
Not working anymore !
=> Booting Puma
=> Rails 5.1.1 application starting in production on http://0.0.0.0:3000
=> Runrails server -h
for more startup options
Puma starting in single mode…- Version 3.11.3 (ruby 2.3.4-p301), codename: Love Song
- Min threads: 0, max threads: 16
- Environment: production
- Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.169 seconds); all pooled connections were in use):
app/utils/current_marketplace_resolver.rb:26:in
sole_community_or' app/utils/current_marketplace_resolver.rb:6:in
resolve_from_host’
lib/rack_middleware/marketplace_lookup.rb:13:incall' lib/rack_middleware/custom_cookie_renamer.rb:11:in
call’
lib/rack_middleware/enforce_ssl.rb:23:incall' lib/rack_middleware/health_check.rb:12:in
call’
{“method”:“HEAD”,“path”:“/500”,“format”:“html”,“controller”:“ErrorsController”,“action”:“server_error”,“status”:500,“error”:“ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.083 seconds); all pooled connections were in use”,“duration”:5083.49,“view”:0.0,“db”:0.0,“params”:{},“host”:null,“community_id”:null,“current_user_id”:null,“user_agent”:null,“referer”:null,“forwarded_for”:null,“request_uuid”:null}
Error during failsafe response: could not obtain a connection from the pool within 5.000 seconds (waited 5.083 seconds); all pooled connections were in use
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:202:inblock in wait_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:193:in
loop’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:193:inwait_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:154:in
internal_poll’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:278:ininternal_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:148:in
block in poll’
/home/ubuntu/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/monitor.rb:214:inmon_synchronize' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:158:in
synchronize’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:148:inpoll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:747:in
acquire_connection’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:500:incheckout' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in
connection’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:inretrieve_connection' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_handling.rb:116:in
retrieve_connection’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_handling.rb:88:inconnection' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:239:in
execute_simple_calculation’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:204:inperform_calculation' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:118:in
calculate’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/active_record_5.rb:47:inblock in calculate' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/transaction.rb:849:in
with_database_metric_name’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent.rb:579:inwith_database_metric_name' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/active_record_5.rb:46:in
calculate’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:41:incount' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/querying.rb:13:in
count’
/home/ubuntu/sharetribe/app/utils/current_marketplace_resolver.rb:26:insole_community_or' /home/ubuntu/sharetribe/app/utils/current_marketplace_resolver.rb:6:in
resolve_from_host’
/home/ubuntu/sharetribe/app/controllers/errors_controller.rb:38:incurrent_community' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:413:in
block in make_lambda’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:197:inblock (2 levels) in halting' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/abstract_controller/callbacks.rb:12:in
block (2 levels) in module:Callbacks’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:198:inblock in halting' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:507:in
block in invoke_before’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:507:ineach' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:507:in
invoke_before’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:130:inrun_callbacks' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/abstract_controller/callbacks.rb:19:in
process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/rescue.rb:20:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/instrumentation.rb:32:in
block in process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/notifications.rb:166:inblock in instrument' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/notifications/instrumenter.rb:21:in
instrument’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/notifications.rb:166:ininstrument' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/instrumentation.rb:30:in
process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/params_wrapper.rb:252:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/railties/controller_runtime.rb:22:in
process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/abstract_controller/base.rb:124:inprocess' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionview-5.1.1/lib/action_view/rendering.rb:30:in
process’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal.rb:189:indispatch' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal.rb:253:in
dispatch’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:49:indispatch' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:31:in
serve’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/journey/router.rb:46:inblock in serve' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/journey/router.rb:33:in
each’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/journey/router.rb:33:inserve' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:832:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/show_exceptions.rb:49:inrender_exception' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/show_exceptions.rb:34:in
rescue in call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/show_exceptions.rb:30:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/lograge-0.5.1/lib/lograge/rails_ext/rack/logger.rb:15:incall_app' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/rack/logger.rb:24:in
block in call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/tagged_logging.rb:69:inblock in tagged' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/tagged_logging.rb:26:in
tagged’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/tagged_logging.rb:69:intagged' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/rack/logger.rb:24:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/remote_ip.rb:79:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/request_store-1.3.2/lib/request_store/middleware.rb:9:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/request_id.rb:25:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/method_override.rb:22:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/runtime.rb:22:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/executor.rb:12:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/static.rb:125:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/sendfile.rb:111:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/sharetribe/lib/rack_middleware/enforce_ssl.rb:23:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/sharetribe/lib/rack_middleware/health_check.rb:12:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/engine.rb:522:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/railtie.rb:185:inpublic_send' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/railtie.rb:185:in
method_missing’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/deflater.rb:34:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/configuration.rb:225:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/server.rb:624:inhandle_request' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/server.rb:438:in
process_client’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/server.rb:302:inblock in run' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/thread_pool.rb:120:in
block in spawn_thread’ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.081 seconds); all pooled connections were in use):
app/utils/current_marketplace_resolver.rb:26:in
sole_community_or' app/utils/current_marketplace_resolver.rb:6:in
resolve_from_host’
lib/rack_middleware/marketplace_lookup.rb:13:incall' lib/rack_middleware/custom_cookie_renamer.rb:11:in
call’
lib/rack_middleware/enforce_ssl.rb:23:incall' lib/rack_middleware/health_check.rb:12:in
call’ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.287 seconds); all pooled connections were in use):
app/utils/current_marketplace_resolver.rb:26:in
sole_community_or' app/utils/current_marketplace_resolver.rb:6:in
resolve_from_host’
lib/rack_middleware/marketplace_lookup.rb:13:incall' lib/rack_middleware/custom_cookie_renamer.rb:11:in
call’
lib/rack_middleware/enforce_ssl.rb:23:incall' lib/rack_middleware/health_check.rb:12:in
call’
{“method”:“GET”,“path”:“/500”,“format”:“html”,“controller”:“ErrorsController”,“action”:“server_error”,“status”:500,“error”:“ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.131 seconds); all pooled connections were in use”,“duration”:5131.08,“view”:0.0,“db”:0.0,“params”:{},“host”:null,“community_id”:null,“current_user_id”:null,“user_agent”:null,“referer”:null,“forwarded_for”:null,“request_uuid”:null}
Error during failsafe response: could not obtain a connection from the pool within 5.000 seconds (waited 5.131 seconds); all pooled connections were in use
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:202:inblock in wait_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:193:in
loop’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:193:inwait_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:154:in
internal_poll’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:278:ininternal_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:148:in
block in poll’
/home/ubuntu/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/monitor.rb:214:inmon_synchronize' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:158:in
synchronize’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:148:inpoll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:747:in
acquire_connection’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:500:incheckout' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in
connection’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:inretrieve_connection' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_handling.rb:116:in
retrieve_connection’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_handling.rb:88:inconnection' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:239:in
execute_simple_calculation’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:204:inperform_calculation' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:118:in
calculate’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/active_record_5.rb:47:inblock in calculate' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/transaction.rb:849:in
with_database_metric_name’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent.rb:579:inwith_database_metric_name' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/active_record_5.rb:46:in
calculate’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/relation/calculations.rb:41:incount' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/querying.rb:13:in
count’
/home/ubuntu/sharetribe/app/utils/current_marketplace_resolver.rb:26:insole_community_or' /home/ubuntu/sharetribe/app/utils/current_marketplace_resolver.rb:6:in
resolve_from_host’
/home/ubuntu/sharetribe/app/controllers/errors_controller.rb:38:incurrent_community' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:413:in
block in make_lambda’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:197:inblock (2 levels) in halting' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/abstract_controller/callbacks.rb:12:in
block (2 levels) in module:Callbacks’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:198:inblock in halting' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:507:in
block in invoke_before’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:507:ineach' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:507:in
invoke_before’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/callbacks.rb:130:inrun_callbacks' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/abstract_controller/callbacks.rb:19:in
process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/rescue.rb:20:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/instrumentation.rb:32:in
block in process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/notifications.rb:166:inblock in instrument' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/notifications/instrumenter.rb:21:in
instrument’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/notifications.rb:166:ininstrument' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/instrumentation.rb:30:in
process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal/params_wrapper.rb:252:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/railties/controller_runtime.rb:22:in
process_action’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/abstract_controller/base.rb:124:inprocess' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionview-5.1.1/lib/action_view/rendering.rb:30:in
process’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal.rb:189:indispatch' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_controller/metal.rb:253:in
dispatch’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:49:indispatch' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:31:in
serve’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/journey/router.rb:46:inblock in serve' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/journey/router.rb:33:in
each’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/journey/router.rb:33:inserve' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/routing/route_set.rb:832:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/show_exceptions.rb:49:inrender_exception' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/show_exceptions.rb:34:in
rescue in call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/show_exceptions.rb:30:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/lograge-0.5.1/lib/lograge/rails_ext/rack/logger.rb:15:incall_app' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/rack/logger.rb:24:in
block in call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/tagged_logging.rb:69:inblock in tagged' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/tagged_logging.rb:26:in
tagged’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/tagged_logging.rb:69:intagged' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/rack/logger.rb:24:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/remote_ip.rb:79:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/request_store-1.3.2/lib/request_store/middleware.rb:9:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/request_id.rb:25:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/method_override.rb:22:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/runtime.rb:22:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activesupport-5.1.1/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/executor.rb:12:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/actionpack-5.1.1/lib/action_dispatch/middleware/static.rb:125:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/sendfile.rb:111:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/sharetribe/lib/rack_middleware/enforce_ssl.rb:23:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/sharetribe/lib/rack_middleware/health_check.rb:12:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/engine.rb:522:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/railtie.rb:185:inpublic_send' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/railties-5.1.1/lib/rails/railtie.rb:185:in
method_missing’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/rack-2.0.4/lib/rack/deflater.rb:34:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:incall' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/configuration.rb:225:in
call’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/server.rb:624:inhandle_request' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/server.rb:438:in
process_client’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/server.rb:302:inblock in run' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/puma-3.11.3/lib/puma/thread_pool.rb:120:in
block in spawn_thread’
{“method”:“GET”,“path”:“/500”,“format”:“html”,“controller”:“ErrorsController”,“action”:“server_error”,“status”:500,“error”:“ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.166 seconds); all pooled connections were in use”,“duration”:5167.02,“view”:0.0,“db”:0.0,“params”:{},“host”:null,“community_id”:null,“current_user_id”:null,“user_agent”:null,“referer”:null,“forwarded_for”:null,“request_uuid”:null}
Error during failsafe response: could not obtain a connection from the pool within 5.000 seconds (waited 5.166 seconds); all pooled connections were in use
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:202:inblock in wait_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:193:in
loop’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:193:inwait_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:154:in
internal_poll’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:278:ininternal_poll' /home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-5.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:148:in
block in poll’
/home/ubuntu/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize’
/home/ubuntu/.rvm/gems/ruby-2.3.4/gems/activerecord-
I cut a part, it was to long for the forum
And I have access to the console
Appears to be a problem with connection to mysql:
- check if your server has enough CPU, and RAM resources, maybe it goes out of memory/swap
- check your database connection configuration in
config/database.yml
- launch mysql console, and check limits
show variables like '%max_conn%';
andshow processlist
to see if there are excessive connections. - in shell launch
ps -aufwx
to see if you have some extra processes that should not be there - recheck your apache passenger settings https://www.phusionpassenger.com/library/config/apache/optimization/
1/ IDK how to check that
2/ Connected!
3/ @max_conn = NULL
4/There’s a lot of apache2 process
use top
to get overview of server load http://man7.org/linux/man-pages/man1/top.1.html
CPU = between 48 and 87%
MEM = 14%
Sometimes ruby take 99% CPY
seems your server is somewhat overloaded and performing too slow sometimes, so you can temporary increase connection time timeout: 15000
in config/database.yml
What can be the cause of the overload ?