Hi all, I''m trying to use webrick in production for a rails app. I''m happy with the speed but it seems like it refuses to run more than one request at a time.. So I have a long running report generation that freezes all users while it''s running!! Is there any way to increase the number of threads webrick uses to respond to requests?? Thanks in advance!
No, Webrick has a single process to handle concurrent requests. Apparently Action Pack is not thread-safe so webbrick has to serialize the requests. Luke Galea wrote:>Hi all, > >I''m trying to use webrick in production for a rails app. I''m happy with the >speed but it seems like it refuses to run more than one request at a time.. >So I have a long running report generation that freezes all users while it''s >running!! > >Is there any way to increase the number of threads webrick uses to respond to >requests?? > >Thanks in advance! >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
Darn.. I guess fastcgi is my only option then? On Saturday 28 May 2005 13:17, David Teare wrote:> No, Webrick has a single process to handle concurrent requests. > Apparently Action Pack is not thread-safe so webbrick has to serialize > the requests. > > Luke Galea wrote: > >Hi all, > > > >I''m trying to use webrick in production for a rails app. I''m happy with > > the speed but it seems like it refuses to run more than one request at a > > time.. So I have a long running report generation that freezes all users > > while it''s running!! > > > >Is there any way to increase the number of threads webrick uses to respond > > to requests?? > > > >Thanks in advance! > >_______________________________________________ > >Rails mailing list > >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
And a much better one at that. On 5/28/05, Luke Galea <lgalea-vvW6YJTQFGvMohDmgNdYFA@public.gmane.org> wrote:> > Darn.. > > I guess fastcgi is my only option then?_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Luke Galea wrote:>Darn.. > >I guess fastcgi is my only option then? > >Yes it is. Webrick is more of a development tool than a production server. Virtually anything is better than webrick for production, even plain old CGI. - Adam
I wouldn''t go that far. cgi amounts to half a page per second ( 2-3 seconds per page ) while a production webrick can still return 8-10 pages per second in my quick unscientific test.> Yes it is. Webrick is more of a development tool than a production > server. Virtually anything is better than webrick for production, even > plain old CGI.-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://typo.leetsoft.com - Open source weblog engine http://blog.leetsoft.com - Technical weblog
I''m not sure I would go that far. Plain old CGI takes about 10 seconds per page to load, whereas webrick at least doesn''t have to reload all classes for every request. On 5/28/05, Adam Majer <adamm-+878OnfSgr5BDgjK7y7TUQ@public.gmane.org> wrote:> > server. Virtually anything is better than webrick for production, even > plain old CGI._______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails