Last modified: 2013-03-25 14:47:14 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 T28191, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26191 - UnusedFiles Fatal error: Allowed memory
UnusedFiles Fatal error: Allowed memory
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-01 20:12 UTC by Jamie Taniguchi
Modified: 2013-03-25 14:47 UTC (History)
1 user (show)

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


Attachments

Description Jamie Taniguchi 2010-12-01 20:12:42 UTC
The Special:UnusedFiles script seems to have a memory leak that causes a Fatal error. From our email reports this was the error:

2	Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 22664 bytes) in /w/includes/media/Bitmap.php on line 213
Request (GET)

Referrer
User Agent	/wiki/Special:UnusedFiles

-
Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)
Comment 1 Sam Reed (reedy) 2010-12-02 01:27:57 UTC
Or do you just have a lot of unused files, and it needs more than 92 megabytes to execute the request?
Comment 2 Jamie Taniguchi 2010-12-02 01:30:08 UTC
(In reply to comment #1)
> Or do you just have a lot of unused files, and it needs more than 92 megabytes
> to execute the request?

The script itself allocates a limit of 50 images per page by default; the offending page had 50+
Comment 3 Sam Reed (reedy) 2010-12-02 01:30:54 UTC
Right, cheers. That's a little more specific :)
Comment 4 Chad H. 2010-12-02 01:31:46 UTC
(In reply to comment #0)
> The Special:UnusedFiles script seems to have a memory leak that causes a Fatal
> error. From our email reports this was the error:
> 

You mean PHP has memory leaks ;-)

> 2    Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to
> allocate 22664 bytes) in /w/includes/media/Bitmap.php on line 213
> Request (GET)
> 

Your memory limit seems low, you should raise it.
Comment 5 Jamie Taniguchi 2010-12-02 02:06:32 UTC
(In reply to comment #4)
> (In reply to comment #0)
> > The Special:UnusedFiles script seems to have a memory leak that causes a Fatal
> > error. From our email reports this was the error:
> > 
> 
> You mean PHP has memory leaks ;-)
> 
> > 2    Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to
> > allocate 22664 bytes) in /w/includes/media/Bitmap.php on line 213
> > Request (GET)
> > 
> 
> Your memory limit seems low, you should raise it.

The script which runs on PHP, yes. You're getting into semantics that doesn't contribute to the bug at hand.

Yes, I could raise the memory limit but I don't see that as a viable solution to the problem. I could guess at what the problem is (the images on the page haven't had their thumbnail version created yet, landing on the page initiates that process and creating 50+ thumbs is eating up memory) but that doesn't mean increasing the memory limit is the solution. What if to stop the fatal errors I had to increase the memory limit on that page to 500mb? that's not acceptable.
Comment 6 Max Semenik 2010-12-08 17:53:51 UTC
(In reply to comment #4)

> You mean PHP has memory leaks ;-)

Or our media handler o_0

> Your memory limit seems low, you should raise it.

It's higher than on WMF with its insane amount of extensions and other funny stuff.

Jamie, try appending something like ?limit=10 to the UnusedFiles URL and find out if this is caused by a particular image (do you have DjVu's, by the way?)
Comment 7 Jamie Taniguchi 2011-01-10 22:36:17 UTC
(In reply to comment #6)
> (In reply to comment #4)
> 
> > You mean PHP has memory leaks ;-)
> 
> Or our media handler o_0
> 
> > Your memory limit seems low, you should raise it.
> 
> It's higher than on WMF with its insane amount of extensions and other funny
> stuff.
> 
> Jamie, try appending something like ?limit=10 to the UnusedFiles URL and find
> out if this is caused by a particular image (do you have DjVu's, by the way?)

I'm noticing a pattern; the email errors for this problem, that I'm getting are only for bots (Google, Yahoo, etc). I cannot reproduce it even with setting ?limit=500 

I've never heard of DjVu, I doubt we have it.

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


Navigation
Links