Getting error regarding sourcemaps

Sentry sees my sourcemap but it won’t load it on error reports because of this apparently : Remote file too large for caching

My file is 11MB, which I know is quite large, but as per the documentation, the limit appears to be 40MB.

What should I do here ?

Same thing is happening to me. The mapping file is 9MB only in my case but still too large for sentry.

Apparently it’s because you’re not properly uploading sourcemaps, which in turn causes sentry to look for it on your public http/s endpoint.

1 Like

We are also getting this error.

@Khiman_Louer can you please elaborate. What do you mean with “not properly uploading”?
Has Sentry’s support stated that Remote file too large for caching is an error one gets for going the " Hosting Publicly" route (see Hosting Publicly for React | Sentry Documentation )?

Sentry looks for the file online (publicly) because it does not find it in the uploaded artifacts of your corresponding release.

The question was why are we getting “Remote file too large for caching” and not why it looks for the file online… The limit is 40MB, so why I get the error on the 9MB file?

40MB is the limit for the files you upload to sentry when you create the release, the limit for files that sentry needs to fetch if you don’t upload artifacts beforehand is much lower than that @igora .

We’re experience the same issue with our on-premise installation of Sentry. The file, that sentry wants to load is 7.9 MB, way below the 40MB-Limit. I have no idea, why this error occurs.

I changed configuration CACHES from

CACHES  {
    "default": {
       "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
       "LOCATION": ["memcached:11211"],
        "TIMEOUT": 3600,
    }
}

to

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
        'LOCATION': '/var/tmp/django_cache',
    }
}

and it works.
But I still need caches to work in memcached

We were able to fix this by changing the max object size for memcached to 20MB in our on-premise installation.

Here’s the git diff to docker-compose.yml & sentry/sentry.conf.py:

diff --git a/docker-compose.yml b/docker-compose.yml
index 29342e4..fdff56e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -100,6 +100,7 @@ services:
   memcached:
     <<: *restart_policy
     image: "memcached:1.6.9-alpine"
+    command: "-I 20M"
     healthcheck:
       <<: *healthcheck_defaults
       # From: https://stackoverflow.com/a/31877626/5155484
diff --git a/sentry/sentry.conf.py b/sentry/sentry.conf.py
index 2d89b56..ee17609 100644
--- a/sentry/sentry.conf.py
+++ b/sentry/sentry.conf.py
@@ -107,6 +107,9 @@ CACHES = {
         "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
         "LOCATION": ["memcached:11211"],
         "TIMEOUT": 3600,
+        "OPTIONS": {
+            "server_max_value_length": 1024 * 1024 * 20,
+        },
     }
 }

Tried to upload a pic of the diff but uploading didn’t work.