Luiz E.
Luiz E.

Reputation: 7279

Octopus not sending reads to slave

I have the following configuration for a slave:

octopus:
  replicated: true
  fully_replicated: true 
  environments:
    - staging
    # - production

  staging:
    shards:
      slave1:
        host: database_ip
        username: <%= ENV['DATABASE_USERNAME'] %>
        password: <%= ENV['DATABASE_PASSWORD'] %>
        database: <%= ENV['DATABASE_NAME'] %>

I checked pg_stat_activity from this slave and there is nothing, not a single query is running except from mine.
Am I missing something from octopus configuration? I went through the wiki but couldn't find anything else than shards.yml

Upvotes: 1

Views: 203

Answers (1)

Thanh
Thanh

Reputation: 8624

You can try (without shards key):

octopus:
  replicated: true
  fully_replicated: true 
  environments:
    - staging
    # - production

  staging:
    slave1:
      host: database_ip
      username: <%= ENV['DATABASE_USERNAME'] %>
      password: <%= ENV['DATABASE_PASSWORD'] %>
      database: <%= ENV['DATABASE_NAME'] %>

From Config file wiki

Upvotes: 1

Related Questions