Last modified: 2013-11-18 23:33:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58728, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56728 - localStorage nearly or totally filled with routine operation
localStorage nearly or totally filled with routine operation
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.23.0
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 18:09 UTC by Chris McMahon
Modified: 2013-11-18 23:33 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
beta commons localStorage nearly full (101.83 KB, image/png)
2013-11-07 18:09 UTC, Chris McMahon
Details
beta commons localStorage after loading UploadWizard (79.95 KB, image/png)
2013-11-07 18:10 UTC, Chris McMahon
Details

Description Chris McMahon 2013-11-07 18:09:19 UTC
Created attachment 13721 [details]
beta commons localStorage nearly full

seen on beta labs while logged in as Selenium_user
seen in Chrome/Chromium, not checked in Firefox (yet)

consistent behavior seen:  
initial load of VisualEditor in beta enwiki sets localStorage to 3.5MB
initial load of UploadWizard in beta commons sets localStorage to 2.5MB

routine navigation to pages like 
* wikitext editor
* Flow e.g. http://en.wikipedia.beta.wmflabs.org/wiki/Talk:Flow_QA
* Special:NewPagesFeed
* etc

continues to fill localStorage until it maxes out.

inconsistent behavior: 

I do not have a consistent repro to max out localStorage.  at first I thought that repeatedly hitting shift-reload/cancel on a ?veaction=edit page did it, but on my second attempt I was unable to max out localStorage that way
Comment 1 Chris McMahon 2013-11-07 18:10:09 UTC
Created attachment 13722 [details]
beta commons localStorage after loading UploadWizard
Comment 2 Chris McMahon 2013-11-07 18:11:00 UTC
Comment on attachment 13721 [details]
beta commons localStorage nearly full

I meant beta enwiki for this attachment
Comment 3 Brion Vibber 2013-11-07 18:12:04 UTC
Can we determine the limits of available localStorage in some consistent way?
Comment 4 Chris McMahon 2013-11-07 18:17:22 UTC
(In reply to comment #3)
> Can we determine the limits of available localStorage in some consistent way?

I believe it is per-browser.  Empirically I found that my Chromium allows 5MB while my Chrome allows 10MB. 

See http://arty.name/localstorage.html (warning: fills up your local storage upon loading the page and gives you a status message when done)
Comment 5 Brion Vibber 2013-11-07 18:18:54 UTC
So apparently the only way to find the limit is to keep adding data until you fill it up. Awesome.

http://dev-test.nemikor.com/web-storage/support-test/

^ looks like a frequent limit is 5MB, which in some browsers means 2.5M *UTF-16 code points*. That's going to be pretty tight for the amount of code we want to store. :(
Comment 6 Bartosz Dziewoński 2013-11-07 18:28:18 UTC
Well, the limit can be worked around… 

"Introducing the HTML5 Hard Disk Filler™ API" http://feross.org/fill-disk/

:P
Comment 7 Ori Livneh 2013-11-07 18:34:02 UTC
Several points:
- Can you isolate the size of the module storage? You can check it by running mw.loader.inspect('store') in a JavaScript console. (See 'totalSize' column).
- Pruning old modules from the cache is deferred until the page / DOM is quiescent. What happens if you just let the page load and hang out for 5-10 seconds?
- Is this reproducible outside the beta cluster? My suspicion is that the mtimes of modules is being continuously changed because of the way it is set up. Haven't investigated yet, but the way to check would be to load the startup module and compare module versions across reloads.
Comment 8 Ori Livneh 2013-11-07 18:56:14 UTC
(In reply to comment #7)
> My suspicion is that the mtimes of modules is being continuously changed
> because of the way [beta] is set up.

Doesn't appear to be the case. I hacked up a quick script to check: <https://gist.github.com/atdt/7359920>. No changes were merged to master while I tested, though; still interested to know what happens then.
Comment 9 Chris McMahon 2013-11-07 19:00:34 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > My suspicion is that the mtimes of modules is being continuously changed
> > because of the way [beta] is set up.
> 
> Doesn't appear to be the case. I hacked up a quick script to check:
> <https://gist.github.com/atdt/7359920>. No changes were merged to master
> while
> I tested, though; still interested to know what happens then.

And BTW, if you do find config differences between beta enwiki and prod, please let me know.  I have other intermittent/unreproduceable performance problems with Chrome (not Firefox) there that are becoming quite frustrating, seen in particular in VE and UploadWizard.  I worry that these problems exist in production but are so flaky that they are not reported.
Comment 10 Ori Livneh 2013-11-07 19:32:28 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > My suspicion is that the mtimes of modules is being continuously changed
> > > because of the way [beta] is set up.
> > 
> > Doesn't appear to be the case. I hacked up a quick script to check:
> > <https://gist.github.com/atdt/7359920>. No changes were merged to master
> > while
> > I tested, though; still interested to know what happens then.
> 
> And BTW, if you do find config differences between beta enwiki and prod,
> please
> let me know.  I have other intermittent/unreproduceable performance problems
> with Chrome (not Firefox) there that are becoming quite frustrating, seen in
> particular in VE and UploadWizard.  I worry that these problems exist in
> production but are so flaky that they are not reported.

modules are updating pretty frequently on beta. 20 mins' worth here: <https://gist.github.com/atdt/7359920#file-rl-mon-log>. I'm running it again now *with* timestamps.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links