# QuotaExceededError - storage - exceeded the quota

**URL:** https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151
**Category:** Bug
**Created:** [2015年一月18日 17:38 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151 "2015-01-18T17:38:37Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年一月18日 17:38 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/1 "2015-01-18T17:38:37Z")

</div>

From Error logs

```
Discourse 1.2.0.beta4 - https://github.com/discourse/discourse version 3cea85e09a5a86d7a965fb2ffd8b132659b79db0

```

###Info

```
QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.
Url: http://example.com/assets/vendor-0dbc6e71b0ee5428574e3562afe91ef1.js
Line: 5
Column: 20205
Window Location: http://example.com/t/example/66158?utm_medium=email&utm_source=transactional&utm_campaign=club_email

```

###Env

```
HTTP_HOST: example.com
REQUEST_URI: /logs/report_js_error
REQUEST_METHOD: POST
HTTP_USER_AGENT: Mozilla/5.0 (iPad; CPU OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B440 Safari/600.1.4
HTTP_ACCEPT: */*
HTTP_REFERER: http://example.com/t/example/66158?utm_medium=email&utm_source=transactional&utm_campaign=club_email
HTTP_X_FORWARDED_FOR: 86.174.1.2
HTTP_X_REAL_IP: 86.174.1.2

params:
  message: QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded t
  url: http://example.com/assets/vendor-0dbc6e71b0ee5428574e3562afe91ef1.js
  line: 5
  column: 20205
  window_location: http://example.com/t/example/66158?utm_medium=email&utm_source=transactional&

```

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015年一月18日 18:14 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/2 "2015-01-18T18:14:23Z")

</div>

LocalStorage is used for the composer settings; I think this person has their browser set to deny cookie & localstorage requests.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年一月18日 20:45 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/3 "2015-01-18T20:45:30Z")

</div>

It might be - generally my users aren’t the type to play with any type of setting.

If I had this:

> [@Include username with JavaScript error reports](https://meta.discourse.org/t/include-username-with-javascript-error-reports/24068):
>
> Is it possible to include the username (if the user is logged in) with JavaScript error reports? This would be very useful in following up on problems, devices, configurations etc.

I might know the user and track them down.

Or perhaps if the last 3 IP’s per-user were logged - a single IP is a bit pointless with so many people having multiple devices, 1 3G, 1 Wifi etc.

Or might be able to prove they are not a member.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2015年九月29日 17:29 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/11 "2015-09-29T17:29:11Z")

</div>

I don’t find any QuotaExceededError in our logs at all, but they wouldn’t be related to a 500 error from the server.

If you deployed using the [standalone config](https://github.com/discourse/discourse_docker/blob/master/samples/standalone.yml), then the redis server is in the docker container (since everything is in there). Did you use standalone? Which size droplet did you use?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年九月29日 21:21 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/12 "2015-09-29T21:21:20Z")

</div>

Just to confirm I’m still seeing them:

 ![](https://global.discourse-cdn.com/meta/original/3X/6/2/62d6ac051d45aaded01b3fc7ebaa8cf8a1d95b5c.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2015年九月30日 22:17 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/20 "2015-09-30T22:17:02Z")

</div>

Good idea, see if we can repro this error with Safari in private mode, @neil.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015年九月30日 22:44 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/21 "2015-09-30T22:44:17Z")

</div>

The KeyValueStore object protects against throwing on first access, not all accesses. So we need to add try-catch to all its methods.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [2015年十月1日 00:48 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/22 "2015-10-01T00:48:07Z")

</div>

> [@sam](#):
>
> sounds most likely that people are using Safari in private mode

The user base for this particular Discourse installation is prominently aged mostly 40 to 65 years old…  
… it would be a lot of inexperienced non-technical users slipping into “private mode”.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [2015年十月1日 19:22 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/23 "2015-10-01T19:22:40Z")

</div>

I can definitely reproduce this by using Safari on Mac in private mode and going to my notifications page (/users/neil/activity). Javascript console shows:

```plaintext
Error while processing route: user.notifications (2)
"QuotaExceededError: DOM Exception 22"

```

It isn’t being logged, but that’s how it happens.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2015年十月13日 08:22 UTC](https://meta.discourse.org/t/quotaexceedederror-storage-exceeded-the-quota/24151/24 "2015-10-13T08:22:51Z")

</div>

While fixing [a bug](https://bbs.boingboing.net/t/bug-swiping-back-in-safari-causes-page-error/67286) I got rid of these `QuotaExceededError` errors 😉

[https://github.com/discourse/discourse/commit/cafff9bf013d58315f65934e208ea5927a9af214](https://github.com/discourse/discourse/commit/cafff9bf013d58315f65934e208ea5927a9af214)
