-
Notifications
You must be signed in to change notification settings - Fork 37
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
Gem hangs passenger phusion when trying to generate filled pdfs in controller actions #18
Comments
@jdejong Did you ever find an answer to this? |
@jdejong and anyone else who comes after us: |
I also have locally problems with puma. Rails console is good, when I try to use it in the controller its not working. |
To get this working, we're using: Apache: It doesn't seem that Is there something that could be changed to fix this in the gem? This issue is fairly hard to debug for people who don't know the answer yet, and it doesn't seem optimal that we need to change our web server configuration just to generate a PDF. Does anyone know where in the gem things are hanging or why the spawn method matters? Thanks so much for working on this! |
A Phusion Passenger developer explained in this thread why Passenger hangs when Rails is used with JVM. It looks like it'll be quite difficult for me to fix, and I don't know when I'll get to doing it and whether this is something I can even fix. I've added the Deployment with Phusion Passenger + Nginx section with some workarounds (thanks @adam-scimed). @simonfranzen If your app was hanging with Puma when used in Rails controllers, that is likely caused by an error that I fixed earlier today in version 0.9.2. |
@vkononov @simonfranzen did you find a solution to make it worked in controller actions ? I tried to remove spring gems, it did not work for me. |
@nflorentin Are you able to share a sample project where you are experiencing the hang? Or at least You also mentioned that it runs locally. Do you mean locally in the console? Or locally in the controller action? Are you running the project with puma? |
hi @vkononov I don't have a sample project, I'm under a huge load of work so I don't know if I will be able to do it soon. I'm using Puma. All my tests are done in development because the features are not in production yet so I don't know if that would work in production environment. |
@nflorentin Would you be able to share your |
Sure @vkononov. I'm on Mac OS 10.15.7, Java 8 update 311. |
Thanks, @nflorentin. I noticed that your |
@vkononov sorry for the late answer, the project is on ruby 2.5.9 |
@vkononov @simonfranzen @nflorentin did you find a solution to make it work in controller actions in the development environment? I tried to remove spring gems, but it did not work for me. Rails Version: 5.2.8.1 |
@fuadkhan1996 Are you able to provide an stripped down example project? I have not been able to reproduce this issue so far. |
@vkononov I tried creating a sample project with the versions and Gemfile I told above. Fillable-pdf is working there but not on my office's project. |
@fuadkhan1996 Then I would guess that there are other gems or configurations in your office project that are causing this issue. If I am unable to reproduce the issue, I'm afraid I cannot help you. |
@vkononov I just fixed it. It was hanging because I had workers set up in my puma.rb configuration file. I removed it and fillable-pdf started working. I think using this information you can reproduce the issue.
|
@fuadkhan1996 Looks like this is caused by an issue with the |
I know there are some issues with this gem and the application server or things like spring, but I figured it would not conflict with more modern application servers but that does not seem to be the case. Has anyone seen an issue with passenger phusion and generation of PDF's on the fly in controllers. I will say I did add one function to the FillablePDF class to add a function to make streaming PDF content easier.
Using puma locally everything works fine, but once the code is deployed to phusion the request hangs and eventually hangs all of the web requests to the server.
Thanks in advance for any ideas on how to make this gem place nicely with passenger.
The text was updated successfully, but these errors were encountered: