Page MenuHomePhabricator

500 Internal Server Error when trying to upload 98 MB file to Commons
Closed, ResolvedPublic

Description

I'm repeatedly getting an internal server error (and a blank page) when trying to upload a large (but still < 100 MiB) file to Commons. Here are the request and headers from one attempt, courtesy of Firebug:

Request:

Host: commons.wikimedia.org
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://commons.wikimedia.org/w/index.php?title=Special:Upload&uselang=fromgov
Cookie: <deleted>

Response:

Date: Thu, 04 Jun 2009 23:02:39 GMT
Server: Apache
X-Powered-By: PHP/5.2.4-2ubuntu5wm1
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
Content-Encoding: gzip
Vary: Accept-Encoding
X-Vary-Options: Accept-Encoding;list-contains=gzip
Content-Length: 20
Content-Type: text/html
X-Cache: MISS from sq27.wikimedia.org, MISS from knsq26.knams.wikimedia.org, MISS from knsq29.knams.wikimedia.org
X-Cache-Lookup: MISS from sq27.wikimedia.org:3128, MISS from knsq26.knams.wikimedia.org:3128, MISS from knsq29.knams.wikimedia.org:80
Via: 1.0 sq27.wikimedia.org:3128 (squid/2.7.STABLE6), 1.0 knsq26.knams.wikimedia.org:3128 (squid/2.7.STABLE6), 1.0 knsq29.knams.wikimedia.org:80 (squid/2.7.STABLE6)
Connection: close

While I can't be sure of what's causing this, I'd suspect it may be because the PHP config variables post_max_size and memory_limit are set to exactly 100 MB in Wikimedia's php.ini file (which is why I'm filing this as a Wikimedia bug). Thus, my guess would be that MediaWiki is hitting the 100 MB memory limit, causing PHP to abort execution.

According to PHP documentation, memory_limit should exceed post_max_size, which in turn should exceed max_upload_size. If we do want to support uploading files of up to 100 MB, I'd suggest bumping post_max_size slightly to, say, 101 MB and memory_limit up to, say, 120 MB to account for general overhead.

BTW, are we keeping any error logs that could be used to confirm the cause of this error?


Version: unspecified
Severity: normal
URL: http://toolserver.org/~vyznev/temp/President_Obama_Speaks_to_the_Muslim_World_from_Cairo,_Egypt.ogv

Details

Reference
bz19082

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:42 PM
bzimport set Reference to bz19082.
bzimport added a subscriber: Unknown Object (MLST).

Ps. I've put the file I've been trying to upload temporarily on the toolserver, just in case it might help: see URL above.

Is this any better with stashed images etc?

Assuming this to work now. Upload wizard made it easier and safer to upload big files to commons.

Bug was opened 3 years ago and is unlikely to get any feedback, so I am closing it.