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

Middleware instantiated multiple times under JRuby #1102

Open
mwpastore opened this issue Mar 15, 2016 · 1 comment
Open

Middleware instantiated multiple times under JRuby #1102

mwpastore opened this issue Mar 15, 2016 · 1 comment

Comments

@mwpastore
Copy link
Member

Running a simple app on Puma under JRuby (in single mode with many threads), I've noticed that a single use statement in my Sinatra class definition causes that piece of middleware to be instantiated multiple times, instead of it being instantiated once and shared between threads (as one might suspect). Moving the use statement out of the class definition and into a rackup script solves the problem, as does calling run MyApp.new instead of run MyApp from the rackup script.

Sinatra 1.4.7, Puma 3.1.0, JRuby 9.0.5.0, OpenJDK 7.

@dentarg
Copy link
Member

dentarg commented Feb 10, 2023

@mwpastore Still think this is an issue? A complete repro would be nice.

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

No branches or pull requests

2 participants