Hi everyone,
I’m facing a strange issue with a fresh Discourse installation and I’d appreciate any guidance.
Environment
- Discourse Docker (latest stable)
- Ubuntu 24.04
- Fresh installation using
discourse_docker - No plugins except OpenID Connect
- Git repository is clean
- Reverse proxy with nginx
- HTTP only (no HTTPS yet)
- Local Git repository exists and is on
latestbranch
The strange behavior
Anonymous users:
Home page loads normally
Normal authenticated users:
Work normally
Users authenticated through OpenID Connect:
Work normally
But every local Discourse admin user gets a timeout and finally:
Oops
The software powering this discussion forum encountered an unexpected problem.
or sometimes
Server is currently experiencing high load.
What we tested
We created a brand new local admin using
rake admin:create
Result:
- user as Admin →
500 timeout - same user after changing
u.admin = false
u.save!
→
works immediately
So the issue is reproducible only when admin == true.
Log
The worker always times out after about 30 seconds.
Backtrace:
GitUtils.try_git
GitUtils.has_commit?
DiscourseUpdates.new_features
DiscourseUpdates.has_unseen_features?
CurrentUserSerializer
ApplicationLayoutPreloader
The timeout always happens here:
/var/www/discourse/lib/git_utils.rb:33
Kernel#`
Important observation
Running Git manually inside the container is instantaneous.
For example:
git rev-parse HEAD
returns in about 7 ms.
Also:
git merge-base --is-ancestor <current_commit> HEAD
returns immediately.
So Git itself is not slow.
Redis
new_features does not seem to exist:
redis-cli exists new_features latest_new_feature_created_at
(integer) 0
Question
Why would GitUtils.has_commit? block only for admin users while every Git command executes instantly from the shell?
Is there any known issue in recent versions of Discourse where DiscourseUpdates or new_features causes admin-only timeouts?
Any ideas on where to investigate next would be greatly appreciated.
Thanks!