# מחזיר 500 בעת בקשת אווטארים מותאמים אישית של משתמשים

**URL:** https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454
**Category:** Support
**Tags:** unsupported-install, s3, users
**Created:** [1 באוקטובר,‏ 2025,‏ 10:21am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454 "2025-10-01T10:21:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![MoRanYue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moranyue/32/523065_2.png) [@MoRanYue](https://meta.discourse.org/u/MoRanYue)
#### Post date: [1 באוקטובר,‏ 2025,‏ 10:21am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/1 "2025-10-01T10:21:35Z")

</div>

I tried to upload a custom avatar, it could be succesfully uploaded, but when requesting `https://example.com/user_avatar/example.com/example_user/96/11_2.png`, it just returned 500 error. The default anonymous avatar has no this error.

Latest `master` Discourse branch.  
Cloudflare R2 is used as my S3 storage.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [1 באוקטובר,‏ 2025,‏ 10:23am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/2 "2025-10-01T10:23:47Z")

</div>

> [@About deploying Discourse on Windows Server](https://meta.discourse.org/t/about-deploying-discourse-on-windows-server/384295/6):
>
> I insist on my way, now the forum has been perfectly deployed without Docker.

Are you on an #unsupported-install?

In any case 500 alone isn’t sufficient information. Please share the related log info and someone might help you.

---

<div class="post-metadata">

### Author: ![MoRanYue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moranyue/32/523065_2.png) [@MoRanYue](https://meta.discourse.org/u/MoRanYue)
#### Post date: [1 באוקטובר,‏ 2025,‏ 10:33am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/3 "2025-10-01T10:33:43Z")

</div>

Of course. By the way, I have used Cloudflare R2 (S3-compatible) to store upload content, when I checked out files in the bucket, the avatar file was actually there, but clients could not access it with `https://example.com/user_avatar/example.com/example_user/96/11_2.png`, it’s so weird.

---

<div class="post-metadata">

### Author: ![MoRanYue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moranyue/32/523065_2.png) [@MoRanYue](https://meta.discourse.org/u/MoRanYue)
#### Post date: [1 באוקטובר,‏ 2025,‏ 10:58am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/4 "2025-10-01T10:58:34Z")

</div>

ב-`production.log`, מצאתי את השורה הזו:

```plaintext
Processing by UserAvatarsController#show as PNG
  Parameters: {"hostname" => "echonet.icu", "username" => "where", "size" => "288", "version" => "12_2"}
Completed 418 in 599ms (Views: 4.1ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.4ms)

```

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [1 באוקטובר,‏ 2025,‏ 11:04am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/5 "2025-10-01T11:04:26Z")

</div>

This may be related to:

> [@/user\_avatar returns HTTP 500 after new update](https://meta.discourse.org/t/user-avatar-returns-http-500-after-new-update/384418/1):
>
> All avatars showing up like this: [image] When opened in a new tab `[http://forum.example.org/user\_avatar/forum.example.org/user/48/681\_2.png\`](http://forum.example.org/user_avatar/forum.example.org/user/48/681_2.png%5C%60) responds with HTTP 500. I’m using an S3 upload for images (blackblaze). Seems that an avatar image is uploaded there. Tried disabling it, still the same issue. Doesn’t seem like a proxy issue. Tried binding port to the server, same issue. Opening `[http://localhost:8082/user\_avatar/forum.example.org/user/48/681\_2.png\`](http://localhost:8082/user_avatar/forum.example.org/user/48/681_2.png%5C%60) results in: This only …

Could be an S3 issue with the latest version 🤔.

---

<div class="post-metadata">

### Author: ![MoRanYue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moranyue/32/523065_2.png) [@MoRanYue](https://meta.discourse.org/u/MoRanYue)
#### Post date: [1 באוקטובר,‏ 2025,‏ 11:21am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/7 "2025-10-01T11:21:52Z")

</div>

בסדר, הלוואי שזו רק בעיה ששייכת לגרסת הלילה הנוכחית. זה נפתר על ידי הגדרת פרוקסי.

---

<div class="post-metadata">

### Author: ![avidseeker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/avidseeker/32/428135_2.png) [@avidseeker](https://meta.discourse.org/u/avidseeker)
#### Post date: [3 באוקטובר,‏ 2025,‏ 11:43pm UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/8 "2025-10-03T23:43:29Z")

</div>

> [@MoRanYue](#):
>
> Solved by setting a proxy

Hey @MoRanYue, could you elaborate more on how you solved it?

I facing the same problem.

Thanks

---

<div class="post-metadata">

### Author: ![MoRanYue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moranyue/32/523065_2.png) [@MoRanYue](https://meta.discourse.org/u/MoRanYue)
#### Post date: [4 באוקטובר,‏ 2025,‏ 5:11am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/9 "2025-10-04T05:11:12Z")

</div>

@avidseeker  
כאשר אתה משתמש בשירות OSS והשרת שלך לא יכול לגשת אליו, לדוגמה, אתה נמצא בסין והחיבורים של השרת שלך ל-Cloudflare R2 נחסמים על ידי ספק האינטרנט המקומי. כאשר לקוחות מנסים לרכוש משאבי אווטאר מותאמים אישית, השרת שלך צריך לרכוש אותו מה-OSS, אך נכשל, ואז מחזיר 500 ללקוחות.

במקרה שלי, הגדרת שני משתני סביבה: `HTTP_PROXY` ו-`HTTPS_PROXY` לשרת פרוקסי שיכול לגשת לשירות ה-OSS שלך. אם התקנת את Discourse באמצעות התקנה סטנדרטית, בקובץ `app.xml` שלך אמור להיות שדה הנקרא `env`, הוסף את שני המשתנים הללו ואז תוכל להריץ. השתמשתי בהתקנה לא נתמכת ומשתמש ב-Systemd לניהול Discourse, אז הוספתי שני פרמטרים של `Environment` בקובץ `.service`.

אני לא יודע אם במדינה שלך יש מערכת צנזורה ברשת. אם כן, אני יכול להניח שאתה כבר יודע מה לעשות; אם לא, בדוק את הסטטוס המקוון של שירות ה-OSS שלך ואת ההגדרות שלך לגבי S3.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [3 בנובמבר,‏ 2025,‏ 5:11am UTC](https://meta.discourse.org/t/returning-500-when-requesting-users-custom-avatars/384454/10 "2025-11-03T05:11:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
