# 로그인 후 사용자별 502 오류 발생 — DiscourseUpdates.has\_unseen\_features?로 원인 확인

**URL:** https://meta.discourse.org/t/user-specific-502-errors-after-login-traced-to-discourseupdates-has-unseen-features/394612
**Category:** Support
**Tags:** nginx, login, users
**Created:** [1월 28, 2026, 11:13오후 UTC](https://meta.discourse.org/t/user-specific-502-errors-after-login-traced-to-discourseupdates-has-unseen-features/394612 "2026-01-28T23:13:42Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![serkhelesheyi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/serkhelesheyi/32/497726_2.png) [@serkhelesheyi](https://meta.discourse.org/u/serkhelesheyi)
#### Post date: [1월 28, 2026, 11:13오후 UTC](https://meta.discourse.org/t/user-specific-502-errors-after-login-traced-to-discourseupdates-has-unseen-features/394612/1 "2026-01-28T23:13:42Z")

</div>

안녕하세요,

제 Discourse에서 **로그인 후 특정 관리자(admin) 계정에서만 502 오류가 발생**하는 이상한 문제를 겪고 있습니다. 다른 상황은 다음과 같습니다:

- 익명 사용자는 사이트를 정상적으로 접근할 수 있습니다.

- 다른 사용자 계정은 로그인하고 사이트를 정상적으로 사용할 수 있습니다.

- 문제는 **특정 계정(관리자 계정)에서만** 발생합니다.

* * *

### 🧩 환경 정보

- Discourse는 **공식 Docker 설정** 으로 설치되었습니다.

- 리버스 프록시 / CDN: **ArvanCloud** (Cloudflare와 유사)

- 국제 인터넷 접속이 **제한적이거나 불안정** 합니다 (GitHub 및 일부 외부 서비스에 접근 불가)

- Discourse는 **약 1개월 동안 업데이트되지 않았습니다**

* * *

### ❗ 증상

사이트에 접근할 때:

- **프라이빗/시크릿 모드** 로 사이트를 열면 → 사이트가 정상적으로 로드됩니다.

- **주 계정** 으로 로그인하면 → 즉시 **502 Bad Gateway** 오류가 발생합니다.

- **다른 계정** 으로 로그인하면 → 모든 기능이 정상적으로 작동합니다.

따라서 문제는 명확하게 **사용자별로 발생하며 인증 후 트리거** 됩니다.

* * *

### 📄 CDN (ArvanCloud) 오류 로그

주요 오류 두 가지가 나타납니다:

#### 1. Upstream timeout while reading upstream

```plaintext
upstream timed out (110: Connection timed out) while reading upstream

```

영향을 받는 URL은 대부분 자산(assets)입니다. 예를 들어:

- /assets/browser-detect-\*.js

- /assets/plugins/automation-\*.js

- /assets/plugins/discourse-gamification-\*.js

- /assets/plugins/discourse-lazy-videos-\*.js

#### 2. Upstream prematurely closed connection

```plaintext
upstream prematurely closed connection while reading response header from upstream

```

예를 들어:

- /stylesheets/common\_theme\_rtl\_\*.css

- /theme-javascripts/\*.js

즉, CDN은 Discourse에서 응답을 기다리지만 백엔드가 타임아웃되거나 연결을 닫습니다.

* * *

### 🔍 백엔드에서 발견한 내용

Rails 스택 트레이스에서 오류 경로는 다음을 가리킵니다:

- `current_user_serializer.rb`

- `discourse_updates.rb`

- 메서드: `DiscourseUpdates.has_unseen_features?`

이는 크래시/타임아웃이 **로그인된 사용자의 새 기능 공지사항을 확인하는 동안** 발생한다는 것을 시사합니다.

단일 사용자만 영향을 받는 점을 고려하면, 이 문제는 전역 사이트 렌더링이 아니라 **사용자별 직렬화(user-specific serialization) 과정**에서 트리거되는 것으로 보입니다.

* * *

도움말을 주시면 감사하겠습니다.

감사합니다.

---

_[View the full topic](https://meta.discourse.org/t/user-specific-502-errors-after-login-traced-to-discourseupdates-has-unseen-features/394612)._
