Project

General

Profile

Actions

Question #2141

closed

Error when uploading jpg file

Added by Nicholas Melvani 7 months ago. Updated 23 days ago.

Status:
Closed
Priority:
Normal
Category:
Backend
Target version:
-
Start date:
2023-12-08
Estimated time:
Cooperation:
Approaching Byzantium

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
Actions #1

Updated by Alexander Watzinger 7 months 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
Thank you for reporting. I don't think it's related to the file size. Could you please:

That way I can test it locally and later online to find out what the problem might be.

Actions #2

Updated by Nicholas Melvani 7 months ago

Thank you for your reply. Here is the URL:
https://mamems.openatlas.eu/insert/file/5562

I am attaching the file.

Actions #3

Updated by Alexander Watzinger 7 months 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.

Actions #4

Updated by Alexander Watzinger 7 months 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.

Anyway, assigning to Bernhard for later analysis, some info:
  • 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
Actions #5

Updated by Nicholas Melvani 7 months 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.

Actions #6

Updated by Alexander Watzinger 7 months 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.

Actions #7

Updated by Bernhard Koschiček-Krombholz 7 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.

Actions #8

Updated by Alexander Watzinger 6 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.

Actions #9

Updated by Alexander Watzinger 23 days ago

  • Cooperation Approaching Byzantium added
Actions

Also available in: Atom PDF