Page MenuHomePhabricator

Thumbnail render throttling should not result in HTTP 500
Closed, ResolvedPublic

Description

thumb.php throttles thumbnail rendering in various ways, and it returns a HTTP 500 if a request was refused due to throttling. That is wrong and causes false alarms; a 4xx status code should be used (probably HTTP 429 Too Many Requests).

There are multiple places where this needs to be fixed:

  • when User::pingLimiter returns false
  • when the attempt-failures memcached key hits the limit
  • when PoolCounter refuses to take the job (can that happen?)

Event Timeline

Tgr created this task.Aug 24 2015, 8:58 PM
Tgr updated the task description. (Show Details)
Tgr raised the priority of this task from to Needs Triage.
Tgr added a subscriber: Tgr.
Restricted Application added a project: Multimedia. · View Herald TranscriptAug 24 2015, 8:58 PM
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald Transcript

Change 234039 had a related patch set uploaded (by Aaron Schulz):
Reduced some instances of HTTP 500 in thumb.php

https://gerrit.wikimedia.org/r/234039

Change 234039 merged by jenkins-bot:
Reduced some instances of HTTP 500 in thumb.php

https://gerrit.wikimedia.org/r/234039

Change 234152 had a related patch set uploaded (by Gergő Tisza):
Return HTTP 429 when thumbnailing is throttled due to too many errors

https://gerrit.wikimedia.org/r/234152

Change 234152 merged by jenkins-bot:
Return HTTP 429 when thumbnailing is throttled due to too many errors

https://gerrit.wikimedia.org/r/234152

Tgr closed this task as Resolved.Aug 26 2015, 10:24 PM
Tgr claimed this task.