Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.
This repository was 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

@sebbean

Description

@sebbean

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 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions