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

Allow eager autoloading #199

Open
atomic-hedgehog opened this issue Apr 29, 2015 · 2 comments
Open

Allow eager autoloading #199

atomic-hedgehog opened this issue Apr 29, 2015 · 2 comments

Comments

@atomic-hedgehog
Copy link

In a multi-threaded environment we are seeing circular dependency exceptions (usually around representer classes).

Rails suffers from the same problem, but in production a rails app will use eager autoloading to prevent it. However, this doesn't seem to hold for Napa since we are seeing the same issue in production.

I have spent some time trying to find a way to force eager autoloading in Napa, but nothing seemed to work. Is there already a simple way to enable eager autoloading or will this require an update to Napa?

@darbyfrey
Copy link
Contributor

We've actually run into this issue sporadically as well, but it hasn't been in a repeatable way that we could debug. Have you been able to construct a repeatable scenario for this? If so, I'd love to find out how you did it so we could trace down the issue.

Also, what server are you running on in production?

@atomic-hedgehog
Copy link
Author

We have an Angular app for our front end, so that was where we first noticed it (lots of concurrent calls to the API server). We are using SwaggerUI, and I can consistently cause the error by spamming GET requests through there (to an API wrapping a simple ActiveRecord model without much business logic).

Our app is still under heavy development and our production deploys are still internal test sites, so we are using webrick for both development and production. I haven't tried other web servers yet, but we are planning to stick with multithreaded servers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants