Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Background process 'expire_url_cache_data' threw an exception #7182

Closed
richvdh opened this issue Mar 31, 2020 · 5 comments
Closed

Background process 'expire_url_cache_data' threw an exception #7182

richvdh opened this issue Mar 31, 2020 · 5 comments
Assignees

Comments

@richvdh
Copy link
Member

richvdh commented Mar 31, 2020

I'm seeing this every few seconds:

2020-03-31 12:30:15,350 - synapse.rest.media.v1.preview_url_resource - 401 - INFO - expire_url_cache_data-1 - Running url preview cache expiry
2020-03-31 12:30:15,351 - synapse.metrics.background_process_metrics - 215 - ERROR - expire_url_cache_data-1 - Background process 'expire_url_cache_data' threw an exception
Traceback (most recent call last):
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rav/work/synapse/synapse/metrics/background_process_metrics.py", line 213, in run
    return (yield result)
  File "/home/rav/work/synapse/env3/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/home/rav/work/synapse/synapse/rest/media/v1/preview_url_resource.py", line 430, in _expire_url_cache_data
    await self.store.delete_url_cache(removed_media)
TypeError: object NoneType can't be used in 'await' expression
@richvdh
Copy link
Member Author

richvdh commented Mar 31, 2020

looks like this was introduced in #7110, though I'm a bit surprised by the error message. delete_url_cache returns a Deferred, not a None.

@richvdh
Copy link
Member Author

richvdh commented Mar 31, 2020

scratch that, sometimes it returns a None.

@clokep
Copy link
Member

clokep commented Mar 31, 2020

Should be fixed in #7184.

@clokep clokep closed this as completed Mar 31, 2020
@richvdh richvdh reopened this Apr 7, 2020
@richvdh
Copy link
Member Author

richvdh commented Apr 7, 2020

there's another one I'm afraid:

Traceback (most recent call last):
  File "/opt/synapse/synapse/synapse/metrics/background_process_metrics.py", line 213, in run
    return (yield result)
  File "/opt/synapse/env3/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/synapse/synapse/synapse/rest/media/v1/preview_url_resource.py", line 478, in _expire_url_cache_data
    await self.store.delete_url_cache_media(removed_media)
TypeError: object NoneType can't be used in 'await' expression

@richvdh
Copy link
Member Author

richvdh commented Apr 7, 2020

fixed in #7241

@richvdh richvdh closed this as completed Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants