Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#48379 closed defect (bug) (fixed)

Expand error codes to include all 5xx HTTP errors when retring to create image sub-sizes

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.3
Component: Upload Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

Related #47872.

After [46506] it became apparent that the server may return HTTP 504 or 508 errors when resizing of images failed. The server may be set to return other 5xx error codes too. To fix this additional requests to retry to create image sub-sizes should happen on all HTTP 5xx errors.

Attachments (1)

48379.diff (3.1 KB) - added by azaozz 5 years ago.

Download all attachments as: .zip

Change History (14)

#1 @azaozz
5 years ago

Setting this tentatively for 5.3 as it will fix the new functionality to work for all users and with most server configurations.

@azaozz
5 years ago

#2 @azaozz
5 years ago

In 48379.diff: Try to create image sub-sizes again after all HTTP 5xx errors.

This ticket was mentioned in Slack in #hosting-community by azaozz. View the logs.


5 years ago

#4 @kirasong
5 years ago

As reference / one example, it looks like 508 is commonly used by cPanel (see discussion on Slack), so I think at the very least we should fix that.

Upon a bit more research, looks like this isn't the only other code in the 5xx range that is used.

To cover the most cases, I agree retrying for any 5xx would be the best.

Trying to see if I can get this working on my test setup for retries that worked previously.

This ticket was mentioned in Slack in #core-media by mike. View the logs.


5 years ago

#6 @kirasong
5 years ago

  • Keywords has-patch needs-testing added

#7 @azaozz
5 years ago

  • Summary changed from Expand error codes to include all 5xx HTTP errors when retring to create imabe sub-sizes to Expand error codes to include all 5xx HTTP errors when retring to create image sub-sizes

#8 @kirasong
5 years ago

Just a quick update that this looks to work with tests so far in the media library.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


5 years ago

This ticket was mentioned in Slack in #core by azaozz. View the logs.


5 years ago

#11 @SergeyBiryukov
5 years ago

  • Keywords commit dev-reviewed added; needs-testing removed

48379.diff looks good to me.

#12 @azaozz
5 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 46566:

Upload: Expand error codes to include all 5xx HTTP errors when retrying to create image sub-sizes. Some servers may be configured to set HTTP 508 or 504, or possibly other 5 errors.

Porps mikeschroder, azaozz.
Fixes #48379.

This ticket was mentioned in Slack in #core-media by mike. View the logs.


5 years ago

Note: See TracTickets for help on using tickets.