I''m running ubuntu hardy 8.04 with mod_rails on a site that gets about
1000 hits a day.  the site runs perfectly fine if there are only a
handful of users making request.  but when the site gets busy i run out
of memory because of too many passenger processes.
i have 256MB RAM and 512 swap.
i have tuned down some of the apache settings:
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
<IfModule mpm_prefork_module>
    StartServers          3
    MinSpareServers       3
    MaxSpareServers       3
    MaxClients           50
    MaxRequestsPerChild   0
</IfModule>
<IfModule mpm_worker_module>
    StartServers          3
    MaxClients           50
    MinSpareThreads       3
    MaxSpareThreads       3
    ThreadsPerChild      10
</IfModule>
i''m not sure what i should do next.  maybe i should switch to a mongrel
cluster?  are there any settings in in passenger i should be looking at
to optimize this configuration?
i don''t mind if the site slows down a little bit i just don''t
want it
crashing everyday!  please help!
-- 
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
-~----------~----~----~----~------~----~------~--~---
reading through the mod_rails help i see i can change a few parameters #define DEFAULT_LOG_LEVEL 0 #define DEFAULT_MAX_POOL_SIZE 2 #define DEFAULT_POOL_IDLE_TIME 300 #define DEFAULT_MAX_INSTANCES_PER_APP 0 i found these located in Configuration.cpp. do i need to recompile passenger? or can i just set this as a global value somewhere like in the virtual host declaration? -- 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 -~----------~----~----~----~------~----~------~--~---
On 30 Jun 2008, at 05:14, Scott Kulik wrote:> reading through the mod_rails help i see i can change a few parameters > > #define DEFAULT_LOG_LEVEL 0 > #define DEFAULT_MAX_POOL_SIZE 2 > #define DEFAULT_POOL_IDLE_TIME 300 > #define DEFAULT_MAX_INSTANCES_PER_APP 0 > > i found these located in Configuration.cpp. do i need to recompile > passenger? or can i just set this as a global value somewhere like in > the virtual host declaration?http://www.modrails.com/documentation/Users%20guide.html#_resource_control_and_optimization_options And yes, it''s in the vhost config. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> http://www.modrails.com/documentation/Users%20guide.html#_resource_control_and_optimization_options > > And yes, it''s in the vhost config. > > Best regards > > Peter De Berdtok thanks. i found out that i need to set PassengerMaxPoolSize to 2. I have tried setting this in apache2.conf and in my virtual host. <VirtualHost *:80> SetEnv RAILS_ENV production SetEnv PassengerMaxPoolSize 2 ServerName domain.com ServerAlias www.domain.com DocumentRoot /u1/app/domain/public ServerAdmin webmaster-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org ErrorLog /u1/app/domain/log/error_log CustomLog /u1/app/domain/log/access_log common </VirtualHost> and restarting apache but my max is still set to 6: ----------- General information ----------- max = 6 count = 2 active = 0 inactive = 2 any other ideas? -- 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 got it. i had to do the following: PassengerMaxPoolSize 2 since it was not an environment variable. -- 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 -~----------~----~----~----~------~----~------~--~---