Hi all!
we did a relaunch/face lift of our website https://www.freitag.de but since then we are seeing a few interesting tracebacks (see them below).
One thing that we did change on the new website is the scales, so we use almost all the upstream Plone 6 scales plus a few custom ones:
<element>giant 3000:65536</element>
<element>huge 2000:65536</element>
<element>portrait_lead 65536:1000</element>
<element>portrait_teaser 65536:600</element>
<element>portrait_mini 65536:200</element>
So, a few ones for really big images and a few ones that are portrait oriented (the width is set to its max so the height is the scaling factor).
Could it be that because image scales are stored in the annotation storage as fieldname-width-hash
we see the raise of image scale storage conflicts?
If the same image is scaled for the 3 portrait oriented scales, the key for the storage uses the same fieldname-width
...
And that could also be the PIL related error? If the image stored is meant to be big, but is actually small, PIL runs out of bytes to read and complains?
I slightly changed the width's of the portrait oriented scales to see if the problem goes away
Anyone noticed that?
Tracebacks
Our dear conflict error:
ConflictError: database conflict error (oid 0x0143adf2, class plone.scale.storage.ScalesDict, serial this txn started with 0x03fba8f7db3e5e11 2024-09-30 20:39:51.385224, serial currently committed 0x03fba8f7dd2ce922 2024-09-30 20:39:51.837992)
PIL traceback:
ValueError: I/O operation on closed file
File "/plone.namedfile-6.2.3.post0-py3.11.egg/plone/namedfile/scaling.py", line 352, in handle_image
result = self.create_scale(
File "/plone.namedfile-6.2.3.post0-py3.11.egg/plone/namedfile/scaling.py", line 325, in create_scale
return scaleImage(data, mode=mode, height=height, width=width, **parameters)
File "/plone.scale-4.1.2-py3.11.egg/plone/scale/scale.py", line 78, in scaleImage
with PIL.Image.open(image) as img:
File "PIL/Image.py", line 3240, in open
fp.seek(0)