Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues uploading images from NBU #23

Open
dleadbetter opened this issue Nov 17, 2022 · 2 comments
Open

Issues uploading images from NBU #23

dleadbetter opened this issue Nov 17, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dleadbetter
Copy link
Contributor

dleadbetter commented Nov 17, 2022

It appears as though some resources uploaded to IIIF Cloud are not having manifests generated.

@dleadbetter dleadbetter added the bug Something isn't working label Nov 17, 2022
@dleadbetter dleadbetter self-assigned this Nov 17, 2022
dleadbetter added a commit that referenced this issue Nov 17, 2022
@dleadbetter
Copy link
Contributor Author

@NickLaiacona and @camdendotlol - It looks like the issue with manifests not being generated was still being caused by an R15 error on Heroku. Although we offloaded the image conversion to a worker, ImageMagick itself was still trying to consume more memory than allowed by the Hobby dyno.

To avoid this issue, I've made the following changes on the IIIF Cloud staging environment:

  • Set MAGICK_MAP_LIMIT to 256MB and MAGICK_MEMORY_LIMIT to 128MB to limit the memory consumed by ImageMagick and avoid an R15 error
  • Increased Redis plan to "Premium 0" to allow for more memory and connections
  • Decreased Sidekiq concurrency to "5" to avoid max database connections
  • Added heroku-buildpack-graphicsmagick to speed up image conversion

I tested by uploading all of the folders in this Google drive as batches (results currently on staging) and confirmed that the IIIF viewer displayed the same number of images that were uploaded. I would, however, encourage additional testing, as there may be use cases I am not aware of.

One important thing to note:
Since we've offloaded the image conversion and manifest generation to workers, we are not guaranteed that these properties will be present on the resource when the upload request finishes. Depending on the size of the image, the conversion could take several seconds, so we don't want to increase the time for users to upload a batch of records.

Should any issues arise in the future, I've added Papertrail to the app to increase visibility into the logging. The Rails/ActiveJob logs are already quite verbose, so I didn't see the need to manually add any additional logging. Papertrail should also allow searching by time, keyword, etc.

@camdendotlol
Copy link

Since we've offloaded the image conversion and manifest generation to workers, we are not guaranteed that these properties will be present on the resource when the upload request finishes. Depending on the size of the image, the conversion could take several seconds, so we don't want to increase the time for users to upload a batch of records.

I think I can address that on NBU's end with the polling prop on the media list, setting it to fetch the latest list of MediaContents every 5 seconds or so.

dleadbetter added a commit that referenced this issue Nov 18, 2022
dleadbetter added a commit that referenced this issue Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants