self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

Document debug file uploads cache config

Open chadwhitacre opened this issue 3 years ago • 6 comments

Reticketing from https://forum.sentry.io/t/ios-debug-info-files-not-uploading/14541:

It does sound a bit like there is a misconfiguration on sentry itself. I wonder if this points to the caching layer not being properly enable as this is necessary for debug file uploads to function.

Can you please send a link to how it should be configured for the debug file uploads to work or if it isn’t documented can you please give us some instructions on how to verify the caching layer is properly enabled?

chadwhitacre avatar Dec 09 '21 16:12 chadwhitacre

I believe we need both SENTRY_CACHE and CACHES['default'] to be configured but as far as I know one can point one to the other. The issue is that certain functionality actually requires the cache to exist (for instance debug file upload) so it's really not a very optional component.

I believe the best solution would be change the defaults to point to the redis cache if the redis queue is also used which I believe is the intended default for the on prem installation.

mitsuhiko avatar Dec 09 '21 16:12 mitsuhiko

From @mitsuhiko in DM:

question is also who knows what the best cache setup is for on prem eg: are we suggesting redis for queues? then probably redis cache? etc not optional, not set by default, no docs :smile:

# XXX: We explicitly require the cache to be configured as its not optional
# and causes serious confusion with the default django cache
SENTRY_CACHE = None

src

chadwhitacre avatar Dec 09 '21 16:12 chadwhitacre

@aminvakil @byk Any thoughts on this one?

Anyone else listening have information to share?

chadwhitacre avatar Dec 09 '21 16:12 chadwhitacre

I vaguely remember us using Redis for caching. I don't know why we have both memcache and redis TBH. @wedamija and @evanpurkhiser would know better regarding caches.

BYK avatar Dec 10 '21 08:12 BYK

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Dec 31 '21 12:12 github-actions[bot]

It looks like SENTRY_CACHE should be set to sentry.cache.redis.RedisCache, and SENTRY_OPTIONS should have an entry like SENTRY_OPTIONS["redis.clusters"]["default"] = {<redis settings>}

There's an example of this in our docker config file here: https://github.com/getsentry/sentry/blob/f667b6dbfd33f83d1b204a3fc1dad5629e8ff37b/docker/sentry.conf.py#L89 It's used by our redis cluster manager here: https://github.com/getsentry/sentry/blob/4b591ecf9703914b98f9e1a9c266b57a2d73cb9c/src/sentry/utils/redis.py#L159

@chadwhitacre

wedamija avatar Jan 06 '22 19:01 wedamija