Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Install ontop of latest spree_starter template results in caching namespace race condition? on production/heroku with MEMCACHEDCLOUD_SERVERS populated #27

Open
sebbean opened this issue Dec 25, 2021 · 0 comments

Comments

@sebbean
Copy link

sebbean commented Dec 25, 2021

Getting this error on heroku production deploys when a memcache resource is enabled

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       I, [2021-12-25T04:04:52.324657 #2170]  INFO -- sentry: ** [Raven] Sending event 0a98455ba0ee42e6b19c3f8c54e41d48 to Sentry
       rake aborted!
       ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished
       /tmp/build_e40e4bf7/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.3/lib/active_record/connection_handling.rb:323:in `connection_pool'
       /tmp/build_e40e4bf7/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.3/lib/active_record/connection_handling.rb:319:in `connection_db_config'
       /tmp/build_e40e4bf7/vendor/bundle/ruby/3.0.0/gems/ros-apartment-2.10.0/lib/apartment.rb:40:in `connection_config'

Afer https://github.com/spree-contrib/spree_shared#installation
Step #6

Looks like this specific block is the issue (Attempting to call Apartment::Tenant.current in a block in production.rb)
https://github.com/spree/spree_starter/blob/main/config/environments/production.rb#L77-L83

The normal config.cache_store line runs fine

Seems related to the second block configuring Dalli ( looking into why/if that config is necessary )

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

1 participant