Page MenuHomePhabricator

UnusedFiles Fatal error: Allowed memory
Closed, DeclinedPublic

Description

Author: tekmosis

Description:
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)


Version: 1.16.x
Severity: normal

Details

Reference
bz26191

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:12 PM
bzimport set Reference to bz26191.
bzimport added a subscriber: Unknown Object (MLST).

Or do you just have a lot of unused files, and it needs more than 92 megabytes to execute the request?

tekmosis wrote:

(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+

Right, cheers. That's a little more specific :)

(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.

tekmosis wrote:

(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.

(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?)

tekmosis wrote:

(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.

Krinkle subscribed.

Closing old report with not enough information about current state to investigate, no feedback in many years.