Question #2141
closedError when uploading jpg file
Added by Nicholas Melvani about 1 year ago. Updated 6 months ago.
Description
I am trying to upload a jpg which is 12.225 KB and receive the following message:
A transaction error occurred. Please report this.
Is it too large? It still says that maximum size is 20 MB.
Files
00000337.jpg (11.9 MB) 00000337.jpg | Nicholas Melvani, 2023-12-11 12:57 |
Updated by Alexander Watzinger about 1 year ago
- Target version set to 8.0.0
- Found in version set to 7.17.4
- Category set to Backend
- Status changed from New to Assigned
- Assignee set to Alexander Watzinger
- Post the URL where you are trying to upload it
- Attach the file here or mail it to me via alexander.watzinger@oeaw.ac.at
That way I can test it locally and later online to find out what the problem might be.
Updated by Nicholas Melvani about 1 year ago
- File 00000337.jpg 00000337.jpg added
Thank you for your reply. Here is the URL:
https://mamems.openatlas.eu/insert/file/5562
I am attaching the file.
Updated by Alexander Watzinger about 1 year ago
- Status changed from Assigned to In Progress
Thank you for the file and additional information. With that I was able to reproduce and confirm the error. It seems to be a cache limit issue:
wand.exceptions.CacheError: cache resources exhausted `/home/alex/projects/www/openatlas/files/uploads/7614.jpg' @ error/cache.c/OpenPixelCache/4095
Unfortunately Bernhard, who implemented the image process functions, is currently on vacation but I will try to find a solution and keep you updated.
Updated by Alexander Watzinger about 1 year ago
- Tracker changed from Bug to Question
- Assignee changed from Alexander Watzinger to Bernhard Koschiček-Krombholz
- Target version changed from 8.0.0 to 8.3.0
- Found in version deleted (
7.17.4)
I managed to solve it with playing around in the ImageMagick config: please @Nicholas Melvani, give it a try now.
This is just a quick fix and should be looked at once Bernhard returns but should work for now.
I changed the tracker to question because this isn't a software but a server configuration issue.
Maybe this can be solved without changing the default values, or even without the use of ImageMagick as some answers hinted when I searched for this problem.
- I changed the /etc/ImageMagick-6/policy.xml but kept a policy_org.xml in the same directory at the ACDH-CH server
- Problem may have been the 13,718 pixel width of the file attached to this issue (wand.exceptions.ImageError: width or height exceeds limit)
- Exception, see last note, happened in openatlas/display/image_processing.py at the image_resizing function
Updated by Nicholas Melvani about 1 year ago
- Tracker changed from Question to Bug
- Assignee changed from Bernhard Koschiček-Krombholz to Alexander Watzinger
- Target version changed from 8.3.0 to 8.0.0
- Found in version set to 7.17.4
Thanks, Alex! Yes, it works now, I uploaded the file and another one which had the same problem.
Updated by Alexander Watzinger about 1 year ago
- Tracker changed from Bug to Question
- Assignee changed from Alexander Watzinger to Bernhard Koschiček-Krombholz
- Target version changed from 8.0.0 to 8.3.0
- Found in version deleted (
7.17.4)
Great to hear and thank you for reporting and feedback.
Updated by Bernhard Koschiček-Krombholz 12 months ago
I will look into it. Thank you, Nicholas, for reporting and thank you, Alex, for fixing it.
Maybe we change from ImageMagick to another software. We will see about this. Especially with the use of IIIF, the manual conversion of images is maybe outdated.
Updated by Alexander Watzinger 11 months ago
- Status changed from In Progress to Closed
- Target version deleted (
8.3.0)
This is issue may be irrelevant in case we decide to do every image operations via IIIF. Either way it is a server configuration related issue which is solved for now so closing the issues.
Thanks for reporting and I'm glad that it worked out in the end.