Steven Hartland
unread,Dec 24, 2010, 10:15:37 AM12/24/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
  to Phusion Passenger Discussions
We're having a problem where by the rails / rack hander is receiving
incomplete POST data for file uploads intermittently.
I've added debugging to the RewindableInput class which populates the
temporary file used to contain the POST data and its always missing
large amounts of data when this issues occurs. For example for a 24MB
file upload it contains only ~16K of data.
The setup we have is:-
machine 1: nginx loadbalancer -> machine 2: nginx + passenger
If I access the nginx + passenger instance directly the request is
processed normally, for the current test case I have, but I believe
this is more luck than judgement.
I've traced the connection data when accessed via the loadbalancer the
request to the nginx + passenger instance on machine 2 contains the
full amount of data so I currently believe there is either a problem
in the nginx passenger module or the helper app.
While going through the code looking for potential issues I came
across the following comment:
"HISTORIC NOTE:
We used to register passenger_content_handler as a default content
handler, instead of setting ngx_http_core_loc_conf_t->handler.
However, if ngx_http_read_client_request_body (and thus
passenger_content_handler) returns NGX_AGAIN, then Nginx will pass the
not-fully-receive file upload data to the upstream handler even though
it shouldn't. Is this an Nginx bug? In any case, setting
ngx_http_core_loc_conf_t->handler fixed the problem."
This seems to describe the issue we're seeing so I'm wondering if its
still not fixed fully?
So the question is this possible and if so any tips on how to confirm
this is the problem or on how to identify where the issue lies?