# 外部系统字母头像下载失败

**URL:** <https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919>\
**Category:** Self-hosting\
**Created:** [2019年三月18日 13:19 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919 "2019-03-18T13:19:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019年三月18日 13:19 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/1 "2019-03-18T13:19:14Z")

</div>

I’ve got a high-volume site (~2 million page views/month) that I have just migrated from Hosted. There are no non-official plugins.

I have a bunch of `rails` logs like:

```
Failed to process hijacked response correctly : undefined method `path' for nil:NilClass

```

I also have a bunch of nginx logs like:

```
[18/Mar/2019:13:16:51 +0000] "www.ketogenicforums.com" 77.16.221.99 "GET /letter_avatar_proxy/v3/letter/s/53a042/90.png HTTP/2.0" "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/73.0.3683.68 Mobile/15E148 Safari/605.1" "user_avatars/show_proxy_letter" 500 258 "https://www.ketogenicforums.com/t/abnormal-run-training-heart-rates/32348/32" 0.048 0.047 "-"

```

From the UX logs I see

```plaintext
/var/www/discourse/app/controllers/user_avatars_controller.rb:158:in `proxy_avatar'
/var/www/discourse/app/controllers/user_avatars_controller.rb:47:in `block in show_proxy_letter'
/var/www/discourse/lib/hijack.rb:56:in `instance_eval'
/var/www/discourse/lib/hijack.rb:56:in `block in hijack'
/var/www/discourse/lib/scheduler/defer.rb:94:in `block in do_work'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.6/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/lib/scheduler/defer.rb:89:in `do_work'
/var/www/discourse/lib/scheduler/defer.rb:79:in `block (2 levels) in start_thread'

```

I can’t tell if it’s related to this: [Avatars are broken after migrating to minio](https://meta.discourse.org/t/avatars-are-broken-after-migrating-to-minio/111888)

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年三月18日 13:32 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/2 "2019-03-18T13:32:24Z")

</div>

Where are you serving the avatars from?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019年三月18日 13:38 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/3 "2019-03-18T13:38:59Z")

</div>

I’ve got `external system avatars enabled` and the `external system avatars url` that was in the database when I got it. Perhaps I should disable the `external system avatars`?

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/d/4dace8d721aeab04e611a8d32f605d91824d4e06.png)

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2019年三月18日 13:45 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/4 "2019-03-18T13:45:32Z")

</div>

That happens when the server fails to download the avatar from the external system. It might have run into a timeout… The particular avatar from the error message seems to work fine right now.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019年三月18日 14:16 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/5 "2019-03-18T14:16:16Z")

</div>

I"m getting about 1.5/second. Does that seem normal?

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/1/c1be4aa4a91d4ae91b480e868018a900caf9915a.png)

(And Ah! I do see that one that was missing is now showing up. . .)

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2019年三月18日 14:27 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/6 "2019-03-18T14:27:22Z")

</div>

No, it’s not normal. Is your server still under high load from the migration or is the server’s internet connection saturated?

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019年三月18日 14:34 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/7 "2019-03-18T14:34:10Z")

</div>

Yeah. The load average is \> 8 (there are 8 cpus).

But, Sidekiq queue is empty, so I’d think that this is an expected load. I don’t have access to stats on network health. More server stats at [Expected 99th percentile performance](https://meta.discourse.org/t/expected-99th-percentile-performance/111924)

Edit: this was soon after a reboot. It looks like these errors have dropped to near zero.

---

<div class="post-metadata">

**Author:** ![PaulL](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paull/32/132803_2.png) [@PaulL](https://meta.discourse.org/u/PaulL)\
**Post date:** [2019年三月19日 03:21 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/8 "2019-03-19T03:21:48Z")

</div>

I’m surprised to see this thread, because whatever you’ve been seeing in the log, Jay, it didn’t affect the user experience.

None of the moderators noticed any trouble with letter avatars before or after today’s reboot, and we would definitely have gotten complaints if any users had noticed. The only noticeable trouble with avatars was during a brief period at the beginning of the migration, and it involved all avatars, not just the letters.

At least today’s reboot seems to have put an end to the unwanted summary e-mails problem, thanks be.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019年三月19日 12:58 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/9 "2019-03-19T12:58:24Z")

</div>

Great! That’s glad to hear, @PaulL. I was tasked with seeing that the system is performing the best it can, so that’s what I’m doing. When I looked at the `/users` page, I did see missing avatars both there and on a user profile, so I am doing everything that I can to see that the problem is resolved.

The good news is that it seems that this particular problem seems to have gone away.

---

<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:** [2019年四月18日 12:58 UTC](https://meta.discourse.org/t/external-system-letter-avatars-fail-to-download/111919/10 "2019-04-18T12:58:29Z")

</div>

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