sul-dlss / riiif

IIIF image server in ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails 5 eager_load & auto_load issues

mejackreed opened this issue · comments

Some of these were alleviated in #75, but when consuming riiif in a Rails 5 application, sometimes a hang will occur when accessing riiif images. This is happening in our use case in the following scenario:

  • A Rails application kicks off a job
  • This job shells out to something that makes 1..n riiif requests

This problem is also present when an orchestration job kicks off multiple jobs that call riiif images.

A quick fix in a consuming Rails application is to set :

config.enable_dependency_loading = true

Contributed by: https://collectiveidea.com/blog/archives/2016/07/22/solutions-to-potential-upgrade-problems-in-rails-5

Though that solution doesn't feel to be like a long term "good" solution.

The "long term solution" proposed by that same article "move all code into app/lib" also doesn't appear to resolve the problem in my experiments.