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

Hanging when used in Rails app #9

Closed
cguess opened this issue Jul 1, 2021 · 5 comments
Closed

Hanging when used in Rails app #9

cguess opened this issue Jul 1, 2021 · 5 comments

Comments

@cguess
Copy link

cguess commented Jul 1, 2021

First: thanks for the great tool, I was going to implement this myself but instead I'll definitely help out if possible to improve via a PR or two.

Second: When attempting to calculate within a Rails console the system just hangs indefinitely. I'm using Rails 6.1.4 and Ruby 3.0.1. Running just a basic Ruby console (i.e. irb) in the same version works perfectly, so it's something within the Rails stack that's causing this.

Any chance there's something off the top of anyone's head that could be causing this?

@Nakilon
Copy link
Owner

Nakilon commented Jul 2, 2021

@cguess thank you for appreciating the project!

Unfortunately I have zero clue in Rails but the gem was tested on 3.0.0 at least.
Your issue pretty much reminds me this one libvips/ruby-vips#310 -- IIRC they with @jcupitt decided it was something about how Rails scales.
Maybe you can tweak something in your Rails configs to see it it's the same issue. If not, let me know.

@Nakilon
Copy link
Owner

Nakilon commented Jul 2, 2021

P.S.: I don't know the Rails console but as I understood it hangs after you issue a command so you are probably able to press ^C to get a backtrace to see what was the last call in stack where it hanged.

@cguess
Copy link
Author

cguess commented Jul 2, 2021

Thanks for the pointers! This is a super basic, brand new Rails app, so it's definitely all odd. I'm going to break out gdb and dig into some internals and my old C debugging skills to try and figure out what's going on and I'll report back.

@jcupitt
Copy link

jcupitt commented Jul 3, 2021

You could try disabling spring. If that's initing libvips and then forking, it could cause the behaviour you are seeing (I think).

Try setting the env var DISABLE_SPRING=1 and running your app again.

@cguess
Copy link
Author

cguess commented Jul 6, 2021

@jcupitt that's the ticket! Now on how to figure out a work around that

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

3 participants