Random behaviour of Discourse / configuration disappearing

(Rostyslav) #1


I have just brought up a Discourse 2.1.1 in a Kubernetes cluster, Discourse and Sidekiq are running in separate containers in a single pod, Postgres 9.6 and Redis 3.2.10 are in different pods.

While configuring OAuth2 authentication I noticed that Discourse settings are just randomly disappearing from time to time: let’s say I’m on settings page, I see all required settings (not only OAuth2) configured properly, when I refresh page there’s a pretty high chance (50%+) that some or even all of the settings will be in their default state.
The same behaviour can be seen on user side. For example my forum settings are set to require authentication, if I am not logged I will sometimes see it (default setting) and sometimes I’ll be required to login (custom config).

I wasted a whole day trying to figure what’s wrong, but I still has no clues. Both Redis and Postgres seems to be running perfectly fine and also I have disabled clustered mode to be sure its not the sync.

Does anyone has any idea what’s might be wrong?

Thanks in advance!

(David Taylor) #2

Have you set it up with a redis instance per-app? Or a single shared redis instance?

Discourse expects the latter, and I think having multiple redis instances could explain the behaviour you’re seeing.

(Rostyslav) #3

Initially I had a 3 instance Redis cluster, while debugging the issue I scaled it to a single instance and its being used exclusively by Discourse and Sidekiq.

Should I bring up a separate instance for Sidekiq?

(David Taylor) #4

A standard installation of Discourse uses a single Redis instance for Sidekiq and Discourse, so that should be safe. In fact, I think running Sidekiq on a separate Redis would probably cause issues.

I can’t think of anything else off the top of my head, but maybe someone else has an idea.

(note that in general we only support standard installations here)

(Stephen) #5

AFAIK postgres 10.5 is required now, right?

(Rostyslav) #6

Thanks, you’re right. However, bumping Postgres to 10.5 didn’t do much difference.