Instead of responding with HTTP 503 if image style is already being generated, wait a little bit longer to allow the other process to complete

Created on 4 May 2018, over 6 years ago
Updated 15 October 2023, 11 months ago

When the client requests an image style which is already being generated then Drupal responds with 503 (ServiceUnavailableHttpException) and set the header Retry-after:3, which means to retry again after 3 seconds. But browsers do not support this header, so no image is displayed. Would be nice to wait couple of seconds before giving up.

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
Image systemΒ  β†’

Last updated about 11 hours ago

Created by

πŸ‡ΈπŸ‡°Slovakia hideaway

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands seanB Netherlands

    If another thread is generating the image, we might no longer need the lock to generate the image. We should probably check if the file exists after a timeout. Also, 5 seconds seems quite long. Changed it to 2 seconds.

  • πŸ‡³πŸ‡±Netherlands seanB Netherlands

    Hmm, 2 seconds seemed to short after all. Sorry about that. Checking if the file exists again seems like a good idea though. No need to add another lock in that case.

  • last update 11 months ago
    30,410 pass
Production build 0.71.5 2024