# Admin users always get 500 timeout in GitUtils.has\_commit?, while normal users work fine

**URL:** https://meta.discourse.org/t/admin-users-always-get-500-timeout-in-gitutils-has-commit-while-normal-users-work-fine/406903
**Category:** Bug
**Created:** [July 6, 2026, 12:16pm UTC](https://meta.discourse.org/t/admin-users-always-get-500-timeout-in-gitutils-has-commit-while-normal-users-work-fine/406903 "2026-07-06T12:16:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aliarjmandi](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@aliarjmandi](https://meta.discourse.org/u/aliarjmandi)
#### Post date: [July 6, 2026, 12:16pm UTC](https://meta.discourse.org/t/admin-users-always-get-500-timeout-in-gitutils-has-commit-while-normal-users-work-fine/406903/1 "2026-07-06T12:16:35Z")

</div>

# 

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 `latest` branch

## 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:

```plaintext

```

```plaintext
Oops

The software powering this discussion forum encountered an unexpected problem.

```

or sometimes

```plaintext

```

```plaintext
Server is currently experiencing high load.

```

## What we tested

We created a brand new local admin using

```plaintext

```

```plaintext
rake admin:create

```

Result:

- user as Admin → ❌ 500 timeout
- same user after changing

```plaintext

```

```plaintext
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:

```plaintext

```

```plaintext
GitUtils.try_git
GitUtils.has_commit?
DiscourseUpdates.new_features
DiscourseUpdates.has_unseen_features?
CurrentUserSerializer
ApplicationLayoutPreloader

```

The timeout always happens here:

```plaintext

```

```plaintext
/var/www/discourse/lib/git_utils.rb:33
Kernel#`

```

## Important observation

Running Git manually inside the container is instantaneous.

For example:

```plaintext

```

```plaintext
git rev-parse HEAD

```

returns in about **7 ms**.

Also:

```plaintext

```

```plaintext
git merge-base --is-ancestor <current_commit> HEAD

```

returns immediately.

So Git itself is not slow.

## Redis

`new_features` does not seem to exist:

```plaintext

```

```plaintext
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!
