[Self-hosted] Certain formats of the same emoji result in gateway timeouts

(#666) Bug Fixed emoji media self-hosting

Summary

Sometimes certain emojis will fail to load in some contexts but will succeed in others.

Steps to reproduce

  1. Add emoji to guild
  2. Send emoji is various ways, either as a sticker, reaction, and chat message
  3. See black box, placeholder emoji name, or a valid emoji
image

Environment

Version: v2 Environment: Docker

Logs or screenshots

Logs from media-proxy
ERROR timestamp=2026-06-23T00:18:51.314757Z fields={"message":"request failed","req":"8QZ0S316C0X8","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=128&quality=lossless","status":504,"duration_ms":15003,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

INFO timestamp=2026-06-23T00:18:56.933084Z fields={"message":"request","req":"NCQN4GMG93FF","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=false&size=240&quality=lossless","status":200,"duration_ms":1,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:19:02.860890Z fields={"message":"request failed","req":"VS2AJMQMYCP7","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=128&quality=lossless","status":504,"duration_ms":15004,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:19:05.037182Z fields={"message":"request failed","req":"ZBF519HSRRCJ","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=false&size=128&quality=lossless","status":504,"duration_ms":15002,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:19:14.560273Z fields={"message":"request failed","req":"Y0RRZ0YDZJD9","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=false&size=128&quality=lossless","status":504,"duration_ms":15002,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0"} target=fluxer_media_proxy::request_log

INFO timestamp=2026-06-23T00:19:15.912777Z fields={"message":"request","req":"NA30YG0WCJD8","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=false&size=240&quality=lossless","status":200,"duration_ms":54,"fetch_ms":0,"transform_ms":52,"nsfw_ms":0} target=fluxer_media_proxy::request_log

INFO timestamp=2026-06-23T00:19:20.881532Z fields={"message":"request","req":"QD0BG3BF1AQS","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=240&quality=lossless","status":200,"duration_ms":52,"fetch_ms":0,"transform_ms":50,"nsfw_ms":0} target=fluxer_media_proxy::request_log

INFO timestamp=2026-06-23T00:19:41.064426Z fields={"message":"request","req":"WZMFKYAGEEYQ","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=240&quality=lossless","status":200,"duration_ms":2,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:19:59.278247Z fields={"message":"request failed","req":"5XJD4A77DXRS","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=128&quality=lossless","status":504,"duration_ms":15004,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:20:45.873178Z fields={"message":"request failed","req":"P6C1GQEHZZ0R","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=128&quality=lossless","status":504,"duration_ms":15005,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:20:47.943764Z fields={"message":"request failed","req":"SGSTF032469X","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=false&size=128&quality=lossless","status":504,"duration_ms":15002,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:21:11.693141Z fields={"message":"request failed","req":"BACVNA96G530","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=true&size=128&quality=lossless","status":504,"duration_ms":15003,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log

ERROR timestamp=2026-06-23T00:21:13.826856Z fields={"message":"request failed","req":"3DN1R4WRG3PQ","kind":"asset_image","method":"GET","path":"/emojis/1516994680598822915.webp","query":"v=5&animated=false&size=128&quality=lossless","status":504,"duration_ms":15003,"fetch_ms":0,"transform_ms":0,"nsfw_ms":0,"reason":"coalescer_timeout_asset_image","source":"","referer":"https://chat.example.com/channels/1516939967606030336/1516939967606030339","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0"} target=fluxer_media_proxy::request_log
  • 611510874-58194241-eeb8-4101-9a0c-03d6075af433.webp

    611510874-58194241-eeb8-4101-9a0c-03d6075af433.webp

    128×128 | 13 kB

4 comments

Sign in with Fluxer to comment and vote.
Comment by @yxdooo
RexSystem 1 vote originally by @yxdooo on GitHub
I think i fixed it, not sure tho. Need someone to review it.
Comment by @lucyrose39
RexSystem 1 vote originally by @lucyrose39 on GitHub
Can confirm this issue still exists for us, and it also seems to impact server icons and profile pictures
Comment by @omstr
RexSystem 1 vote originally by @omstr on GitHub
ye as well as failing on requests the media proxy used to fix itself for me, but now it is consistently doing 200 POSTs and the emoji, before you even send it, you can see in the emoji list it comes out looking with the scan slit lines of the netflix intro & a bland background image
  • 634286087-739f83e8-d8bd-4b40-bffe-449516d8da8d.png

    634286087-739f83e8-d8bd-4b40-bffe-449516d8da8d.png

    155×74 | 2 kB

Comment by @Kenkoman
RexSystem 1 vote originally by @Kenkoman on GitHub
I'm also observing this happening a lot on my own self-hosted instance with emoji, stickers, profile pictures, server icons and server banners. Hosting the latest self-hosting release as of this post