Seems responsive now.

---------------

other suggestions:
The content is not gzip encoded.  At least /static/* content should be

http://httpd.apache.org/docs/2.2/mod/mod_deflate.html

I do not know if Apache gzip filters content from mod_wsgi, i.e. from 
web2py processes.  But that is less important usually.
The cache timings of /static/* seems a bit low so there are a lot more 
requests than necessary, but they should not hurt much since Apache 
correctly replies with 304 and you configured keepalives.

Chrome complains about mixed js + css loading:


   1. Optimize the order of styles and scripts (7)
      1. The following external CSS files were included after an external 
      JavaScript file in the document head. To ensure CSS files are downloaded 
in 
      parallel, always include external CSS before external JavaScript.
         1. calendar.css<http://web2py.com/examples/static/css/calendar.css>
         2. skeleton.css<http://web2py.com/examples/static/css/skeleton.css>
         3. web2py.css <http://web2py.com/examples/static/css/web2py.css>
         4. examples.css<http://web2py.com/examples/static/css/examples.css>
         5. superfish.css<http://web2py.com/examples/static/css/superfish.css>
      2. 2 inline script blocks were found in the head between an external 
      CSS file and another resource. To allow parallel downloading, move the 
      inline script before the external CSS file, or after the next resource.
      3. 
   


mic


Il giorno venerdì 15 giugno 2012 01:57:35 UTC+2, Massimo Di Pierro ha 
scritto:
>
> Followed your advice. Let's see what we get.
>
> massimo
>
> On Thursday, 14 June 2012 16:08:22 UTC-5, mcm wrote:
>>
>> I would still lower Threads to 5 and use the WSGIDaemonProcess 
>> directive with only processes. 
>>
>> WSGIDaemonProcess processes=x 
>>
>> x depends on how much memory you have.  since web2py *is* fast you do 
>> not need higher than x = 4*n cpus. 
>> with processes dal db connection can be with poolsize=1. 
>>
>>
>> mic 
>>
>>
>> 2012/6/14 Massimo Di Pierro <[email protected]>: 
>> > I am switching to nginx as soon as I move the server. Anyway for now I 
>> > disabled apps that are not used (should not be used) and changed the 
>> apache 
>> > conf to 
>> > 
>> > Timeout 35 
>> > KeepAlive On 
>> > MaxKeepAliveRequests 15 
>> > KeepAliveTimeout 2 
>> > <IfModule mpm_worker_module> 
>> >     StartServers          5 
>> >     MaxClients           10 
>> >     MinSpareThreads      15 
>> >     MaxSpareThreads      15 
>> >     ThreadsPerChild      10 
>> >     MaxRequestsPerChild  50 
>> > </IfModule> 
>> > 
>> > and the memory exhaustion problem seems to be gone away. At least for 
>> now. 
>> > 
>> > massimo 
>> > 
>> > On Thursday, 14 June 2012 05:10:43 UTC-5, mcm wrote: 
>> >> 
>> >> Massimo, 
>> >> 
>> >> do you have any good reason to run apache?  if not switch to nginx. 
>> >> 
>> >> mic 
>> >> 
>> >> 
>> >> 2012/6/14 Michele Comitini <[email protected]>: 
>> >> > Correction: 
>> >> >> mpm_worker -> spawn a number of different long running processes to 
>> >> >> manage requests 
>> >> > mpm_worker -> spawn a number of different long running *threads* to 
>> >> > manage requests 
>> >> > 
>> >> > 
>> >> > 2012/6/14 Michele Comitini <[email protected]>: 
>> >> >> mpm_prefork -> fork a number of different long running processes to 
>> >> >> manage requests 
>> >> >> mpm_worker -> spawn a number of different long running processes to 
>> >> >> manage requests 
>> >> >> 
>> >> >> wsgi can fork and thread python interpreters so the overall status 
>> of 
>> >> >> forking and threading varies a lot because of this. 
>> >> >> An important thing to remember is that if the python interpreter 
>> dies 
>> >> >> all threads in the same thread group die. 
>> >> >> If there is a pure threaded only configuration the whole apache 
>> server 
>> >> >> can die if python dies. 
>> >> >> 
>> >> >> Switching to prefork could make the site more available, but does 
>> hide 
>> >> >> the real problem, i.e. the python interpreter dies for some reason. 
>> >> >> 
>> >> >> N.B. php can work reliably only on prefork configuration, because 
>> it 
>> >> >> is not thread safe. 
>> >> >> 
>> >> >> mic 
>> >> >> 
>> >> >> 
>> >> >> 2012/6/14 Massimo Di Pierro <[email protected]>: 
>> >> >>> some follow up. One thing that happened when the problem started 
>> is 
>> >> >>> that I 
>> >> >>> was experimenting with the apache settings and turned off 
>> keepalive. 
>> >> >>> 
>> >> >>> I do not fully understand the implications of apache settings 
>> >> >>> (mpm_prefork_module vs mpm_worker_module) and their parameters but 
>> >> >>> since 
>> >> >>> Python get slower the more cores are available for a fixed number 
>> of 
>> >> >>> threads, there is an optimum set of parameters depending on the 
>> >> >>> architecture. 
>> >> >>> 
>> >> >>> I will continue some experimentation. 
>> >> >>> 
>> >> >>> Massimo 
>> >> >>> 
>> >> >>> 
>> >> >>> On Wednesday, 13 June 2012 17:47:55 UTC-5, Massimo Di Pierro 
>> wrote: 
>> >> >>>> 
>> >> >>>> The fact is I did not have that problem before. The number of 
>> users 
>> >> >>>> has 
>> >> >>>> not increased much. Either a recent commit changed something (if 
>> this 
>> >> >>>> is a 
>> >> >>>> web2py problem) or it is a cache issue (I have many apps and some 
>> >> >>>> cache too 
>> >> >>>> much stuff in ram). 
>> >> >>>> 
>> >> >>>> massimo 
>> >> >>>> 
>> >> >>>> On Wednesday, 13 June 2012 17:38:26 UTC-5, Bruce Wade wrote: 
>> >> >>>>> 
>> >> >>>>> This seems like the same problems I am having with 
>> >> >>>>> new.youadworld.com all 
>> >> >>>>> the resources are getting sucked out of 5 servers. I am starting 
>> to 
>> >> >>>>> think I 
>> >> >>>>> will have to start porting some of the sites features to a 
>> different 
>> >> >>>>> technology. 
>> >> >>>>> 
>> >> >>>>> This is a bad situation as I have been developing 
>> >> >>>>> www.fittraineronline.com also with web2py however I cannot run 
>> into 
>> >> >>>>> the same 
>> >> >>>>> situation with that site, especially when I will have a mobile 
>> web 
>> >> >>>>> app also 
>> >> >>>>> with potentially millions of members. 
>> >> >>>>> 
>> >> >>>>> I am going to continue digging through the core and try to 
>> optimize 
>> >> >>>>> this 
>> >> >>>>> as the developers productivity is great. However spending around 
>> >> >>>>> $1200 a 
>> >> >>>>> month just to run a site that can't handle 40,000 members isn't 
>> >> >>>>> good. 
>> >> >>>>> 
>> >> >>>>> On Wed, Jun 13, 2012 at 3:31 PM, Massimo Di Pierro 
>> >> >>>>> <[email protected]> wrote: 
>> >> >>>>>> 
>> >> >>>>>> I do not know. Everything worked fine for long time until one 
>> week 
>> >> >>>>>> ago I 
>> >> >>>>>> started having problems with the server. The fact is nothing 
>> >> >>>>>> changed in 
>> >> >>>>>> web2py to be causing this. I am still debugging but not much 
>> info 
>> >> >>>>>> to look 
>> >> >>>>>> at. I have lots of apps running on the same server and I am 
>> >> >>>>>> planning to do a 
>> >> >>>>>> major cleanup so we can have mirrors. 
>> >> >>>>>> 
>> >> >>>>>> Massimo 
>> >> >>>>>> 
>> >> >>>>>> On Wednesday, 13 June 2012 16:13:25 UTC-5, JavierQQ wrote: 
>> >> >>>>>>> 
>> >> >>>>>>> 
>> >> >>>>>>> On Wed, Jun 13, 2012 at 4:08 PM, davidjensen  wrote: 
>> >> >>>>>>>> 
>> >> >>>>>>>> cannot establish connection to www.web2py.com 
>> >> >>>>>>>> 2012-06-13T17:11 
>> >> >>>>>>> 
>> >> >>>>>>> 
>> >> >>>>>>> Me too :( 
>> >> >>>>>>> why is this happening constantly? 
>> >> >>>>>>> 
>> >> >>>>>>> Javier 
>> >> >>>>> 
>> >> >>>>> 
>> >> >>>>> 
>> >> >>>>> 
>> >> >>>>> -- 
>> >> >>>>> -- 
>> >> >>>>> Regards, 
>> >> >>>>> Bruce Wade 
>> >> >>>>> http://ca.linkedin.com/in/brucelwade 
>> >> >>>>> http://www.wadecybertech.com 
>> >> >>>>> http://www.fittraineronline.com - Fitness Personal Trainers 
>> Online 
>> >> >>>>> http://www.warplydesigned.com 
>> >> >>>>> 
>> >> >>> 
>>
>

Reply via email to