Hello, I have a rails project going with SCGI running to speed it up. This normally works fine and is very quick compared to rails on its own. But there are times when I may be try (during testing) to upload or download very large files and it just stops working dead. Apache seems to times out (after about 5 min), but for some reason the SCGI process never seems to recover, or time out, and it brings down the whole system. Is there a way of setting a timeout in Zed Shaws SCGI config? so that it just times out that connection instead of bring it all down. On another point, not far from this one, has anyone set up a cluster of scgi process and integrated them into apache with some sort of load balancing method at all? Any examples? Cheers. Dan. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fish Man wrote:> Hello, > I have a rails project going with SCGI running to speed it up. > This normally works fine and is very quick compared to rails on its own. > But there are times when I may be try (during testing) to upload or > download very large files and it just stops working dead. Apache seems > to times out (after about 5 min), but for some reason the SCGI process > never seems to recover, or time out, and it brings down the whole > system. > Is there a way of setting a timeout in Zed Shaws SCGI config? so that it > just times out that connection instead of bring it all down.I''m not sure if there is a way to set it in Apache. In lighttpd, its "disable-time" => 0.> On another point, not far from this one, has anyone set up a cluster of > scgi process and integrated them into apache with some sort of load > balancing method at all? Any examples?Install the most current scgi and ruby-style gems. You can set a cluster to run on multiple ports or a single port. The web server configuration is the exactly same with single port clustering as it is with running a single scgi listener. With either type of clustering, you can restart without losing requests. Read the README that comes with the ruby-style gem for details. I took over the SCGI project from Zed Shaw, so feel free to ask me any questions about it. Jeremy -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeremy Evans wrote:> > Install the most current scgi and ruby-style gems. You can set a > cluster to run on multiple ports or a single port. The web server > configuration is the exactly same with single port clustering as it is > with running a single scgi listener. With either type of clustering, > you can restart without losing requests. Read the README that comes > with the ruby-style gem for details. > > I took over the SCGI project from Zed Shaw, so feel free to ask me any > questions about it. > > JeremyHi thanks for your advice. I think that I understand how to start up clusters for scgi with scgi_cluster, that seems to be well documented. But im not exactly sure what do I need to put into Apache to distribute the load to each of the different processes. There seems to be a good example for lighthttd is there an example avalable for apache2? Cheers. Dan. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fish Man wrote:> Jeremy Evans wrote: >> >> Install the most current scgi and ruby-style gems. You can set a >> cluster to run on multiple ports or a single port. The web server >> configuration is the exactly same with single port clustering as it is >> with running a single scgi listener. With either type of clustering, >> you can restart without losing requests. Read the README that comes >> with the ruby-style gem for details. >> >> I took over the SCGI project from Zed Shaw, so feel free to ask me any >> questions about it. >> >> Jeremy > > Hi thanks for your advice. > I think that I understand how to start up clusters for scgi with > scgi_cluster, that seems to be well documented. > But im not exactly sure what do I need to put into Apache to distribute > the load to each of the different processes. There seems to be a good > example for lighthttd is there an example avalable for apache2?scgi_cluster hasn''t worked since 0.4.3, and that version doesn''t support single-port clustering, which seems to be a requirement if you want to use SCGI with Apache. As I said earlier, install the most current scgi and ruby-style gems, and read the README that comes with ruby-style. It has deployment instructions as well as a sample Apache configuration. Jeremy -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Its seems that Mongrel is easier to set up and configure. Out of interest how does Mongrel compare to SCGI, in terms of speed? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have not been able to test the new Mongrel much but as of yet I feel that a mongrel cluster running behind any reverse proxy runs faster than using SCGI. It is also much easier to setup. -Ron --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry That was in response to Fish Man, "Its seems that Mongrel is easier to set up and configure. Out of interest how does Mongrel compare to SCGI, in terms of speed?" On Nov 2, 2007, at 10:19 AM, Ronald Valente wrote:> > I have not been able to test the new Mongrel much but as of yet I feel > that a mongrel cluster running behind any reverse proxy runs faster > than using SCGI. > It is also much easier to setup. > > -Ron > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fish Man wrote:> Its seems that Mongrel is easier to set up and configure. Out of > interest how does Mongrel compare to SCGI, in terms of speed?A cluster of SCGI listeners is the same speed as a cluster of Mongrel listeners, the difference is not statistically significant. I don''t think it is any more difficult to set up, but there is more documentation about how to set up a mongrel cluster. If you read the README that comes with ruby-style, you''ll see setting up a cluster of SCGI listeners is quite simple, but that''s the only place you''ll find documentation. Jeremy -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
One thing to note is RAM usage. Each mongrel instance requires about 30-40MB ram because it spwns its own ruby process. If you are running on a VPS or something similar you may need to rethink your deployment strategy. -Ron On Nov 2, 2007, at 11:54 AM, Jeremy Evans wrote:> > Fish Man wrote: >> Its seems that Mongrel is easier to set up and configure. Out of >> interest how does Mongrel compare to SCGI, in terms of speed? > > A cluster of SCGI listeners is the same speed as a cluster of Mongrel > listeners, the difference is not statistically significant. I don''t > think it is any more difficult to set up, but there is more > documentation about how to set up a mongrel cluster. If you read the > README that comes with ruby-style, you''ll see setting up a cluster of > SCGI listeners is quite simple, but that''s the only place you''ll find > documentation. > > Jeremy > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---