viettrung do
2010-Jan-10 04:46 UTC
IIS + Apache + Mongrel: Problem with big data submit form
Hi all, I deployed a Rails application on a Windows Server 2003 machine as follows: + I created two instances of Mongrel at ports 4001, 4002 to serve the application + I set up an Apache instance at port 8080 for balancing load for the two Mongrels => So I can access my website at URL http://mywebsite:8080/ + I want to allow users access my website without typing port 8080 in the URL. However, the server already runs IIS for several other web-sites at default port 80. Therefore, I used ISAPI Rewrite to forward requests from IIS (at port 80) to the Apache (and therefore towards the Mongrels) => I can access the website at URL http://mywebsite/ (To do these steps, I followed the guide in book Deploying Rails Application - Pragmatic Bookshelf) Everything seems to work fine until I find out the following problem: In my application, the user register form page allows user to upload his/her avatar. But whenever the file size is bigger than ~30KB, the browser keeps waiting for response from the server until getting timeout error. This error also occurs in any submitting form with a little big posted data. * Looking at the Apache error log file, I got the following error: ------------------ [error] proxy: pass request body failed to 127.0.0.1:4001 ------------------ => Apache seems to fail to forward request to Mongrel instance * Looking at the Mongrel log file, I got the following error: ------------------ Error reading HTTP body: #<RuntimeError: Socket read returned insufficient data ------------------ => Mongrel seems not to receive fully the data whose length specified in Content-Length attribute in the request header. One special thing is that this error just happens when I access the web-site via IIS, i.e., http://mywebsite. This does not happen when I try directly with Apache at http://mywebsite:8080 or Mongrel at http://mywebsite:4001/(4002) So I think there may be something wrong at the point of forwarding requests from IIS to Apache using ISAPI Rewrite. I found this error in httperror.log: ------------------ Timer_EntityBody DefaultAppPool ------------------ But I totally get stuck at that point. Please help if you have any suggestion to solve this problem. Thank you! Best regards, .Viet Trung. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
viettrung do
2010-Jan-13 08:05 UTC
Re: IIS + Apache + Mongrel: Problem with big data submit form
Anybody has any idea, please? Best regards, .Viet Trung. On Jan 10, 11:46 am, viettrung do <viettrung...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I deployed a Rails application on a Windows Server 2003 machine as > follows: > > + I created two instances of Mongrel at ports 4001, 4002 to serve the > application > > + I set up an Apache instance at port 8080 for balancing load for the > two Mongrels => So I can access my website at URLhttp://mywebsite:8080/ > > + I want to allow users access my website without typing port 8080 in > the URL. However, the server already runs IIS for several other > web-sites at default port 80. Therefore, I used ISAPI Rewrite to > forward > requests from IIS (at port 80) to the Apache (and therefore towards > the > Mongrels) => I can access the website at URLhttp://mywebsite/ > > (To do these steps, I followed the guide in book Deploying Rails > Application - Pragmatic Bookshelf) > > Everything seems to work fine until I find out the followingproblem: > > In my application, the user registerformpage allows user to upload > his/her avatar. But whenever the file size is bigger than ~30KB, the > browser keeps waiting for response from the server until getting > timeout > error. > > This error also occurs in any submittingformwith a littlebigposteddata. > > * Looking at the Apache error log file, I got the following error: > ------------------ > [error] proxy: pass request body failed to 127.0.0.1:4001 > ------------------ > => Apache seems to fail to forward request to Mongrel instance > > * Looking at the Mongrel log file, I got the following error: > ------------------ > Error reading HTTP body: #<RuntimeError: Socket read returned > insufficientdata > ------------------ > => Mongrel seems not to receive fully thedatawhose length specified > in > Content-Length attribute in the request header. > > One special thing is that this error just happens when I access the > web-site via IIS, i.e.,http://mywebsite. This does not happen when I > try directly with Apache athttp://mywebsite:8080or Mongrel athttp://mywebsite:4001/(4002) > > So I think there may be something wrong at the point of forwarding > requests from IIS to Apache using ISAPI Rewrite. I found this error in > httperror.log: > ------------------ > Timer_EntityBody DefaultAppPool > ------------------ > > But I totally get stuck at that point. > > Please help if you have any suggestion to solve thisproblem. > > Thank you! > > Best regards, > > .Viet Trung.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Jan-13 11:50 UTC
Re: IIS + Apache + Mongrel: Problem with big data submit form
On Jan 13, 8:05 am, viettrung do <viettrung...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anybody has any idea, please? >This sounds like an IIS problem, and few people on this group will know about that sort of stuff. Have you tried asking on an IIS related group Fred> Best regards, > > .Viet Trung. > > On Jan 10, 11:46 am, viettrung do <viettrung...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi all, > > > I deployed a Rails application on a Windows Server 2003 machine as > > follows: > > > + I created two instances of Mongrel at ports 4001, 4002 to serve the > > application > > > + I set up an Apache instance at port 8080 for balancing load for the > > two Mongrels => So I can access my website at URLhttp://mywebsite:8080/ > > > + I want to allow users access my website without typing port 8080 in > > the URL. However, the server already runs IIS for several other > > web-sites at default port 80. Therefore, I used ISAPI Rewrite to > > forward > > requests from IIS (at port 80) to the Apache (and therefore towards > > the > > Mongrels) => I can access the website at URLhttp://mywebsite/ > > > (To do these steps, I followed the guide in book Deploying Rails > > Application - Pragmatic Bookshelf) > > > Everything seems to work fine until I find out the followingproblem: > > > In my application, the user registerformpage allows user to upload > > his/her avatar. But whenever the file size is bigger than ~30KB, the > > browser keeps waiting for response from the server until getting > > timeout > > error. > > > This error also occurs in any submittingformwith a littlebigposteddata. > > > * Looking at the Apache error log file, I got the following error: > > ------------------ > > [error] proxy: pass request body failed to 127.0.0.1:4001 > > ------------------ > > => Apache seems to fail to forward request to Mongrel instance > > > * Looking at the Mongrel log file, I got the following error: > > ------------------ > > Error reading HTTP body: #<RuntimeError: Socket read returned > > insufficientdata > > ------------------ > > => Mongrel seems not to receive fully thedatawhose length specified > > in > > Content-Length attribute in the request header. > > > One special thing is that this error just happens when I access the > > web-site via IIS, i.e.,http://mywebsite. This does not happen when I > > try directly with Apache athttp://mywebsite:8080orMongrel athttp://mywebsite:4001/(4002) > > > So I think there may be something wrong at the point of forwarding > > requests from IIS to Apache using ISAPI Rewrite. I found this error in > > httperror.log: > > ------------------ > > Timer_EntityBody DefaultAppPool > > ------------------ > > > But I totally get stuck at that point. > > > Please help if you have any suggestion to solve thisproblem. > > > Thank you! > > > Best regards, > > > .Viet Trung.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
viettrung do
2010-Jan-14 05:40 UTC
Re: Re: IIS + Apache + Mongrel: Problem with big data submit form
OK, thank you, Fred. Best regards, .Viet Trung. On Wed, Jan 13, 2010 at 6:50 PM, Frederick Cheung < frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 13, 8:05 am, viettrung do <viettrung...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Anybody has any idea, please? > > > > This sounds like an IIS problem, and few people on this group will > know about that sort of stuff. Have you tried asking on an IIS related > group > > Fred > > > Best regards, > > > > .Viet Trung. > > > > On Jan 10, 11:46 am, viettrung do <viettrung...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hi all, > > > > > I deployed a Rails application on a Windows Server 2003 machine as > > > follows: > > > > > + I created two instances of Mongrel at ports 4001, 4002 to serve the > > > application > > > > > + I set up an Apache instance at port 8080 for balancing load for the > > > two Mongrels => So I can access my website at URLhttp://mywebsite:8080/ > > > > > + I want to allow users access my website without typing port 8080 in > > > the URL. However, the server already runs IIS for several other > > > web-sites at default port 80. Therefore, I used ISAPI Rewrite to > > > forward > > > requests from IIS (at port 80) to the Apache (and therefore towards > > > the > > > Mongrels) => I can access the website at URLhttp://mywebsite/ > > > > > (To do these steps, I followed the guide in book Deploying Rails > > > Application - Pragmatic Bookshelf) > > > > > Everything seems to work fine until I find out the followingproblem: > > > > > In my application, the user registerformpage allows user to upload > > > his/her avatar. But whenever the file size is bigger than ~30KB, the > > > browser keeps waiting for response from the server until getting > > > timeout > > > error. > > > > > This error also occurs in any submittingformwith a littlebigposteddata. > > > > > * Looking at the Apache error log file, I got the following error: > > > ------------------ > > > [error] proxy: pass request body failed to 127.0.0.1:4001 > > > ------------------ > > > => Apache seems to fail to forward request to Mongrel instance > > > > > * Looking at the Mongrel log file, I got the following error: > > > ------------------ > > > Error reading HTTP body: #<RuntimeError: Socket read returned > > > insufficientdata > > > ------------------ > > > => Mongrel seems not to receive fully thedatawhose length specified > > > in > > > Content-Length attribute in the request header. > > > > > One special thing is that this error just happens when I access the > > > web-site via IIS, i.e.,http://mywebsite. This does not happen when I > > > try directly with Apache athttp://mywebsite:8080orMongrel > athttp://mywebsite:4001/(4002) > > > > > So I think there may be something wrong at the point of forwarding > > > requests from IIS to Apache using ISAPI Rewrite. I found this error in > > > httperror.log: > > > ------------------ > > > Timer_EntityBody DefaultAppPool > > > ------------------ > > > > > But I totally get stuck at that point. > > > > > Please help if you have any suggestion to solve thisproblem. > > > > > Thank you! > > > > > Best regards, > > > > > .Viet Trung. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Petr Makarov
2010-Jan-14 10:24 UTC
Re: Re: IIS + Apache + Mongrel: Problem with big data submit form
I''m facing the same trouble. If you already got the clue please let me know (So would I) my email is makarov_petr[at]mail.ru. Thanx. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
viettrung do
2010-Jan-18 06:02 UTC
Re: Re: Re: IIS + Apache + Mongrel: Problem with big data submit form
Hi Makarov, Thanks for sharing the problem. On Thu, Jan 14, 2010 at 5:24 PM, Petr Makarov <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''m facing the same trouble. If you already got the clue please let me > know (So would I) my email is makarov_petr[at]mail.ru. Thanx. >Unfortunately, I have still not figured it out. If having any further clue, I will inform you. Best regards, .Viet Trung. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
T. N. T.
2010-Jan-18 12:47 UTC
Re: IIS + Apache + Mongrel: Problem with big data submit form
viettrung do wrote:> ... > One special thing is that this error just happens when I access the > web-site via IIS, i.e., http://mywebsite. This does not happen when I > try directly with Apache at http://mywebsite:8080 or Mongrel at > http://mywebsite:4001/(4002)What about posting the uploads to http://mywebsite:8080 (as a workaround)? Regards, T. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
T. N. T.
2010-Jan-18 12:50 UTC
Re: IIS + Apache + Mongrel: Problem with big data submit form
T. N. T. wrote:> What about posting the uploads to http://mywebsite:8080 (as a > workaround)?Forget it. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.