Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
file locks have the bad side effect of remaining if the process dies in the middle of the generation process. This will also reduce IO on the NFS drive if using multiple web heads.
Comment | File | Size | Author |
---|---|---|---|
#5 | imagecache-1243258-5.patch | 3.16 KB | mikeytown2 |
#3 | imagecache-1243258-3.patch | 3.17 KB | mikeytown2 |
#1 | imagecache-1243258-1.patch | 2.43 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedShould also take care of redirect loops
Comment #2
sandrewj CreditAttribution: sandrewj commentedyour patch:
1. adds @ on getimagesize to suppress warning messages
2. adjusts relevant comments in code to reflect change in lock system
3. changes lock system to use a database lock
It still probably needs to
1. lock_release after creating the image to prevent default 30 second timeout on parallel request
2. send separate watchdog messages for the case of "received lock but failed to generate images" and "saw a lock in place but after the lock expired there was no derivative image"
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThanks for reviewing this. Patch includes 1. & 2.
Comment #4
sandrewj CreditAttribution: sandrewj commentedI might reword the second error message for clarity to say something like "...but found no generated image from %image using imagecache preset %preset."
After that I will run the patch and hopefully a couple of other people will try it so it can be ready for whenever the next commit comes.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedUpdated the patch with better wording.
Comment #6
sandrewj CreditAttribution: sandrewj commentedLooks like this works fine.
I don't have a way of generating a series of racing request which are certain to collide in order to test every option, but this does fix the infinite loop problems and holds multiple requests until the image generates.
Comment #7
fizk CreditAttribution: fizk commentedMarking as ImageCache 3.x Todo.