Skip to content

fail upload file more 600 mb to chat - access token is not valid #19489

@progserega

Description

@progserega

Description

upload file over 600 mb fail at end of upload process. In encrypted or not room.

Steps to reproduce

  1. setup synapse by https://github.com/spantaleev/matrix-docker-ansible-deploy
  2. set params (and check in config of synapse):
max_upload_size: 3000M
caches:
  cache_autotuning:
    max_cache_memory_usage: 2095841280
    min_cache_ttl: 30s
    target_cache_memory_usage: 1047920640
  cache_entry_ttl: 1080m
  expire_caches: true
  global_factor: 10
  per_cache_factors: null
  sync_response_cache_duration: 2m
  1. create user
  2. connect from firefox element-web to matrix-server
  3. create encrypted and not encrypted room
  4. try send big files (600 mb and 1,8 Gb) to this rooms
  5. 600 mb send success
  6. 1,8 Gb - wait, when file fully upload ~3 minutes (in UI of element-web) - after that element show dialog, that upload is failed.

Homeserver

test-matrix.ru

Synapse Version

1.147.1

Installation Method

Other (please mention below)

Database

single PostgreSQL in docker

Workers

Single process

Platform

https://github.com/spantaleev/matrix-docker-ansible-deploy

Configuration

presence:
enabled: true
retention: null
modules: []

Relevant log output

Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,517 - synapse.access.http.8008 - 596 - DEBUG - POST-330 - 217.150.78.4 - 8008 - Received request: POST /_matrix/media/v3/upload?filename=proxmox-ve_9.1-1.iso
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,517 - synapse.api.auth.mas - 226 - DEBUG - POST-330 - Fetching token from MAS
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-authentication-service[31823]: 2026-02-20T14:14:05.518727Z  WARN mas_handlers::oauth2::introspection:134 POST-1290 -

[synapse.log](https://github.com/user-attachments/files/25444730/synapse.log)

Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-authentication-service[31823]: 2026-02-20T14:14:05.518760Z  INFO http.server.response POST-1290 - "POST /oauth2/introspect HTTP/1.1" 200 OK "Synapse/1.147.1" [polls: 4, cpu: 0.2ms, elapsed: 0.7ms]
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,519 - synapse.api.auth.mas - 250 - DEBUG - POST-330 - Fetched token from MAS
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,519 - synapse.api.auth.mas - 329 - DEBUG - POST-330 - Introspection result: IntrospectionResponse(retrieved_at_ms=1771596845519, active=False, scope=None, username=None, sub=None, device_id=None, expires_in=None)
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,519 - synapse.http.server - 131 - INFO - POST-330 - <XForwardedForRequest at 0x7f6c1479a0d0 method='POST' uri='/_matrix/media/v3/upload?filename=proxmox-ve_9.1-1.iso' clientproto='HTTP/1.1' site='8008'> SynapseError: 401 - Token is not active
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,661 - synapse.access.http.8008 - 641 - INFO - POST-330 - 217.150.78.4 - 8008 - {None} Processed request: 0.002sec/0.000sec (0.000sec, 0.140sec) (0.000sec/0.000sec/0) 79B 401 "POST /_matrix/media/v3/upload?filename=proxmox-ve_9.1-1.iso HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0" [0 dbevts]
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,662 - synapse.handlers.sync - 1668 - DEBUG - GET-478 - Calculating sync response for @denshark:test-matrix.ru between StreamToken(room: RoomStreamToken(stream: 119, topological: None, instances: {}), presence: 5004, typing: 0, receipt: MultiWriterStreamToken(stream: 64, instances: {}), account_data: 128, push_rules: 1, to_device: 24, device_list: MultiWriterStreamToken(stream: 97, instances: {}), groups: 0, un_partial_stated_rooms: 1,thread_subscriptions: 2) and StreamToken(room: RoomStreamToken(stream: 119, topological: None, instances: {}), presence: 5006, typing: 0, receipt: MultiWriterStreamToken(stream: 64, instances: {}), account_data: 128, push_rules: 1, to_device: 24, device_list: MultiWriterStreamToken(stream: 97, instances: {}), groups: 0, un_partial_stated_rooms: 1,thread_subscriptions: 2)
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,662 - synapse.handlers.sync - 1675 - DEBUG - GET-478 - Fetching account data
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,662 - synapse.handlers.sync - 1698 - DEBUG - GET-478 - Fetching room data
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,662 - synapse.util.metrics - 239 - DEBUG - GET-478 - Entering block ephemeral_by_room
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,662 - synapse.util.metrics - 239 - DEBUG - GET-478 - Entering block typing.get_new_events
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,662 - synapse.util.metrics - 252 - DEBUG - GET-478 - Exiting block typing.get_new_events
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.util.metrics - 252 - DEBUG - GET-478 - Exiting block ephemeral_by_room
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.handlers.sync - 2177 - DEBUG - GET-478 - no-oping sync
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.handlers.sync - 1721 - DEBUG - GET-478 - Fetching presence data
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.util.metrics - 239 - DEBUG - GET-478 - Entering block presence.get_new_events
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.util.metrics - 252 - DEBUG - GET-478 - Exiting block presence.get_new_events
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.handlers.sync - 1744 - DEBUG - GET-478 - Fetching to-device data
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.handlers.sync - 1747 - DEBUG - GET-478 - Fetching OTK data
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,663 - synapse.handlers.sync - 1776 - DEBUG - GET-478 - Sync response calculation complete
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,664 - synapse.handlers.sync - 367 - DEBUG - GET-478 - Returning sync response for @denshark:test-matrix.ru
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,664 - synapse.rest.client.sync - 303 - DEBUG - GET-478 - Formatting events in sync response
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,664 - synapse.rest.client.sync - 338 - DEBUG - GET-478 - building sync response dict
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,664 - synapse.rest.client.sync - 291 - DEBUG - GET-478 - Event formatting complete
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-traefik[31981]: 217.150.78.4 - - [20/Feb/2026:14:07:36 +0000] "POST /_matrix/media/v3/upload?filename=proxmox-ve_9.1-1.iso HTTP/3.0" 401 95 "-" "-" 256 "matrix-synapse-public-client-api@docker" "http://172.23.0.8:8008" 388683ms
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,665 - synapse.access.http.8008 - 641 - INFO - GET-478 - 2.63.234.138 - 8008 - {@denshark:test-matrix.ru} Processed request: 30.073sec/0.001sec (0.002sec, 0.004sec) (0.000sec/0.001sec/1) 440B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=unavailable&since=s119_5004_0_64_128_1_24_97_0_1_2 HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36" [0 dbevts]
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-traefik[31981]: 2.63.234.138 - - [20/Feb/2026:14:13:35 +0000] "GET /_matrix/client/v3/sync?filter=0&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=unavailable&since=s119_5004_0_64_128_1_24_97_0_1_2 HTTP/3.0" 200 258 "-" "-" 339 "matrix-synapse-public-client-api@docker" "http://172.23.0.8:8008" 30075ms
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,769 - synapse.access.http.8008 - 596 - DEBUG - OPTIONS-487 - 2.63.234.138 - 8008 - Received request: OPTIONS /_matrix/client/v3/sync?filter=0&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=unavailable&since=s119_5006_0_64_128_1_24_97_0_1_2
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,770 - synapse.access.http.8008 - 641 - DEBUG - OPTIONS-487 - 2.63.234.138 - 8008 - {None} Processed request: 0.000sec/-0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 0B 204 "OPTIONS /_matrix/client/v3/sync?filter=0&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=unavailable&since=s119_5006_0_64_128_1_24_97_0_1_2 HTTP/1.1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36" [0 dbevts]
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-traefik[31981]: 2.63.234.138 - - [20/Feb/2026:14:14:05 +0000] "OPTIONS /_matrix/client/v3/sync?filter=0&timeout=30000&org.matrix.msc4222.use_state_after=true&set_presence=unavailable&since=s119_5006_0_64_128_1_24_97_0_1_2 HTTP/3.0" 204 0 "-" "-" 342 "matrix-synapse-public-client-api@docker" "http://172.23.0.8:8008" 1ms
Feb 20 14:14:05 compute-vm-2-2-30-hdd-1736421736624 matrix-synapse[32258]: 2026-02-20 14:14:05,805 - synapse.handlers.sync - 1668 - DEBUG - GET-480 - Calculating sync response for @test2:test-matrix.ru between StreamToken(room: RoomStreamToken(stream: 119, topological: None, instances: {}), presence: 5004, typing: 0, receipt: MultiWriterStreamToken(stream: 64, instances: {}), account_data: 128, push_rules: 1, to_device: 24, device_list: MultiWriterStreamToken(stream: 97, instances: {}), groups: 0, un_partial_stated_rooms: 1,thread_subscriptions: 2) and StreamToken(room: RoomStreamToken(stream: 119, topological: None, instances: {}), presence: 5006, typing: 0, receipt: MultiWriterStreamToken(stream: 64, instances: {}), account_data: 128, push_rules: 1, to_device: 24, device_list: MultiWriterStreamToken(stream: 97, instances: {}), groups: 0, un_partial_stated_rooms: 1,thread_subscriptions: 2)

Anything else that would be useful to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions