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 raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added a subscriber: Tgr.
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 claimed this task.