Closed Bug 1092752 Opened 10 years ago Closed 9 years ago

Not cache large images only when disk cache is full

Categories

(Core :: Networking: Cache, defect)

All
Windows
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: fireattack, Assigned: michal)

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 Build ID: 20141030172027 Steps to reproduce: 1 Fulfill your cache to max (I tried auto [350MB], 100MB, 60MB, 20MB.. etc). 2 Open this image: https://files.yande.re/image/3dc3fdde6c3bc28513d4074e93169c22/yande.re%20302366%20dress%20fixme%20pion%20sakura_m.png 3 Check image info by right click. You will see this image is NOT CACHED. The most worst thing is, due to this site's refer setting, if you right click and try saving it, you will get an invalid 131 byte file (which is actually a 403 forbidden html page). Actual results: Image not cached. I tested on different profiles clean or not, on fx 34 and nightly, and asked my friends to reproduce it as well (all windows though). I can provide a minimum profile which is be able to reproduce this bug if anyone need. Expected results: Image should be cached: it's only 8MB, and when your disk cache is not full, it will get cached normally. After another bug (bug #1060082) I reported which is also only happens when cache is full, I highly doubt something fundamental is wrong about the mechanics of disk caching. Please take this problem seriously.
Component: Untriaged → Networking: Cache
Product: Firefox → Core
Since that site doesn't allow hotlink, you need to copy the link to location bar and open it directly. I re-host it to: http://plaza.ufl.edu/bpeng/test.png as well.
I don't understand your point, do you mean the image should be cached even if the disk cache is full?
(In reply to Loic from comment #2) > I don't understand your point, do you mean the image should be cached even > if the disk cache is full? I didn't get it, shouldn't it just replace the old ones? If your cache is full you can't cache anything more until them expired? And, you can *still* cache smaller images, css, etc., just not large one, that's the problem.
Since it is not possible to change the platform Ill add another bug. But I will say on Windows XP SP3 32 bit, running current Firefox (and last several versions), I found the following: - any time the cache was full, I would begin to see non-loading images; then no new images would load at all - clearing the cache by itself didn't resolve it - clearing the cache and restarting FF didn't resolve it - clearing the cache ONLY worked to solve the problem if you restarted the computer completely I did a "Refresh" to the current version and it didn't help.
I can reproduce this behavior with Nightly 2016-02-11, but I don't think it should definitely be implemented. (In reply to Benjamin Peng from comment #3) > (In reply to Loic from comment #2) > > I don't understand your point, do you mean the image should be cached even > > if the disk cache is full? > > I didn't get it, shouldn't it just replace the old ones? If your cache is > full you can't cache anything more until them expired? > > And, you can *still* cache smaller images, css, etc., just not large one, > that's the problem. That is the problem, I guess maybe we have a priority and thresholds mechanism, a larger image (file) may be just a few times instead of the common, it probably should not to overwrite the common files in disk cache. However, this is just my guess, I have not to find its roots yet.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → Windows
Hardware: x86_64 → All
I cannot reproduce it on my linux machine. The image is cached and other entries are evicted. If you can reproduce it, please provide a NSPR log (NSPR_LOG_MODULES=timestamp,cache2:5), see https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging. Try to keep the log as small as possible, i.e. start with already full cache, load the image and exit firefox.
Attached file NSPR log.zip (obsolete) —
I hope this is useful.
The log doesn't contain cache2 log messages. Add cache2:5 to NSPR_LOG_MODULES variable.
Attachment #8720064 - Attachment is obsolete: true
In your case the entry is not cached because it is too big. It won't be cached even if cache is empty. By default, we don't store entries bigger than 50MB or bigger than 1/8 of the cache size. Size limit of your cache is 10MB, please try to reproduce with cache size at least 80MB.
(In reply to Lynn Fredricks from comment #4) > Since it is not possible to change the platform Ill add another bug. But I > will say on Windows XP SP3 32 bit, running current Firefox (and last several > versions), I found the following: > > - any time the cache was full, I would begin to see non-loading images; then > no new images would load at all > - clearing the cache by itself didn't resolve it > - clearing the cache and restarting FF didn't resolve it > - clearing the cache ONLY worked to solve the problem if you restarted the > computer completely > > I did a "Refresh" to the current version and it didn't help. This sounds like a different bug. If you can reproduce it reliably, please provide NSPR log of cache2 module, see comments above how to obtain it. Thanks.
Flags: needinfo?(lynn.fredricks)
(In reply to Michal Novotny (:michal) from comment #10) > In your case the entry is not cached because it is too big. It won't be > cached even if cache is empty. By default, we don't store entries bigger > than 50MB or bigger than 1/8 of the cache size. Size limit of your cache is > 10MB, please try to reproduce with cache size at least 80MB. Well, thank you explain the problem. I can't to reproduce it with 350MB limit. Reporter, what's your limit? Can you take the NSPR log? thanks.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(human.peng)
>bigger than 1/8 of the cache size Well I never knew this part before so this may skew results of some of my testing years ago. I am pretty sure I was able to repo this problem on my main profile (with default 350MB setting) as well when I reported this.. That said, I cannot reproduce this problem today any more. I am going to try this on my desktop later.
Flags: needinfo?(human.peng)
Assignee: nobody → michal.novotny
Whiteboard: [necko-active]
I cannot repo this on my desktop either, so I'd consider it as fixed/invalid. Gonna close it until I observed it again.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(lynn.fredricks)
Resolution: --- → WORKSFORME
Oops, I mistakenly cleared needinfo flag (thought that was for me), sorry about that!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: