Hi,
I have a Rails 3.2 app. There is a specific request that takes a long time to execute. The context is, the user uploads a pdf, and then we have some processing through carrierwave + rmagick that generate a jpeg from the first page of the document. Everything works in dev mode using both webrick and thin. The problem happens on the prod environment with Nginx + Passenger.
The request takes a lot of time and the browser is redirected to a "504 Gateway time-out". At this point, the file was already sent, but it's being processed (the pdf manipulation task really takes time). I found several threads with solutions like this: https://groups.google.com/forum/?fromgroups=#!topic/phusion-passenger/LOEb7x-nAy0 that basically consists in patching the hardcoded timeout values on the passenger source before compiling the module.
There is actually no error on the request and the manipulation of the files itself. After a while, the work on the server is finished without any bad behaviour. The processed jpeg is served by the app as nothing bad has actually hapened. This evidence summed up with the fact that everything works in dev mode, points to a nginx+passenger problem.
Anyone has a more clearer solution to the passenger+nginx configuration scheme?