-
Notifications
You must be signed in to change notification settings - Fork 70
Configuration behaviour on v6.0 #111
Description
On the v6.0 I have found some config issues and reported in #106 which solved @PavelJurasek and merged by @Vboss
It looked it's working fine, but finally yesterday I was setting this new version from our local development to staging and production and I have found some other issues:
In some cases, when you specify a different database then it looks like it's creating another connection, but it does not take other values like auth and host:
redis:
host: localhost
port: 6379
auth: hash_key
database: 0
journal: true
storage: true
session:
database: 1
auth: hash_key
debugger: true
If I don't specify auth - it's dying on the exception Client of tcp://127.0.0.1:6379; ERR Client sent AUTH, but no password is set, but when I debug the Client, I saw that the normal client has all the credentials, but other with database1 has no hash, if I specified it, it works.
This is the behavior on our staging and local VM on Ubuntu, where we have all on one server. On the live infrastructure, where we have several web instances and one Redis server it works without the necessary auth under session, but we have no localhost, but internal DNS record to sey-www-prod-redis.
But interesting was that first I set the config the same way on staging and I got another exception: Nette\InvalidStateException: Failed to read session data: redis (path: tcp://127.0.0.1:6379?weight=1&timeout=10&database=1&prefix=Nette.Session%3A&auth=authhash. When I removed the auth from the session, it works. So here it looks like it does not take the host from the main configuration, but only when auth is set. The working config on the live server is:
redis:
host: sey-www-prod-redis
port: 6379
auth: hash_key
database: 2
journal: true
storage: true
session:
database: 1
debugger: true
Until the v5.2 it worked all fine. The main idea is to have separate sessions and with deployment, we can clean the application cache.