Hello,
I want to generate some PDFs from my Rails app.
I use a PHP script to generate the PDF, and it works fine.
In my Rails controller, I just have an action that calls :
#{full_command}
where full_command is something like “/usr/bin/php generate_pdf.php”.
It just works fine.
Now I want to stress test a little my application.
I use this simple ruby script to test my PDF generation :
#!/usr/bin/ruby
10.times do
curl http://0.0.0.0:3000/contents/pdf
end
The result is that only 3 PDFs are generated.
If I use this ruby script :
#!/usr/bin/ruby
10.times do
/usr/bin/php generate_pdf.php
end
Then the 10 PDFs are generated very quickly.
Does anyone have a clue about what I could do for the 10 PDFs being
generated when called in my Rails controller?
I can’t realize where the problem is …
Is this a Mongrel issue (I’m using Rails 2.0 with the Mongrel test
environment)?
Does I have to use something like BackgroundRB? (I’d prefer not to).
Thanks in advance for your lights.
Best,
Thomas.