The config I'm using is the one that comes from the web2py installer for ubuntu/nginx/uwsgi in the scripts directory. So, if that were the case, I think more people would be seeing it too.
-Jim On Wed, Oct 26, 2016 at 9:06 AM, Richard Vézina <ml.richard.vez...@gmail.com > wrote: > Version of soft are not so differents so config may still be used without > changes, but this should be double check... For instance, for me, config > had change significantly since 12.04 related to systemd... Nginx not much > but uwsgi has change. It may wise to check for deprecated uwsgi parameter > flag, depending if you use the web2py deployment script or not as the > script is up to date for 16.04. > > :) > > Richard > > On Tue, Oct 25, 2016 at 2:56 PM, Jim S <j...@qlf.com> wrote: > >> mcm - thanks for that. >> >> On Tuesday, October 25, 2016 at 12:23:27 PM UTC-5, mcm wrote: >>> >>> One clarification ... better performance is mostly due to the fact that >>> the python GIL is not getting in the way.... >>> >>> 2016-10-25 19:20 GMT+02:00 Michele Comitini <michele....@gmail.com>: >>> >>>> > Regarding switching uwsgi to fork-only - should I expect a >>>> performance hit? >>>> >>>> Unless you are very low on RAM you should expect better performance. >>>> Linux fork is a clone call that uses fully fledged copy-on-write strategy. >>>> Uwsgi forks are long running processes so forking overhead has little >>>> impact. Forks happen late in the request handling chain so memory across >>>> processes diverges little even on long periods. >>>> >>>> Keep an eye on RSS usage of processes (use top or htop) if you see a >>>> memory runaway over time, uwsgi will take care of it killing the faulty >>>> long running process. Memory runaway happening too frequently could >>>> be an indication that there is something wrong with your code or some >>>> module you use not releasing some large in memory structure. >>>> >>>> >>>> >>>> 2016-10-25 18:09 GMT+02:00 Jim S <j...@qlf.com>: >>>> >>>>> Richard >>>>> >>>>> Just checked my versions and my old systems that work have: >>>>> >>>>> uwsgi 2.0.10 >>>>> nginx 1.4.6 >>>>> web2py 2.14.6 >>>>> >>>>> New system that needs altered uwsgi config >>>>> >>>>> uwsgi 2.0.14 >>>>> nginx 1.10.0 >>>>> web2py 2.14.6 >>>>> >>>>> My uwsgi configs are identical except for the commented out 'limit-as >>>>> = 512' line. Nginx configs are identical. >>>>> >>>>> >>>>> Regarding switching uwsgi to fork-only - should I expect a performance >>>>> hit? Any other gotchas I should consider? >>>>> >>>>> I'm not too concerned as my pages that use pandas have been working >>>>> just fine for almost 6 months now. But, can never be too careful... >>>>> >>>>> Really appreciate all the input. >>>>> >>>>> -Jim >>>>> >>>>> >>>>> >>>>> On Tuesday, October 25, 2016 at 9:50:36 AM UTC-5, Richard wrote: >>>>>> >>>>>> Jim which web server are we talking now? Nginx? I think you should >>>>>> copy/paste configuration so we can have look, I can compare to mine... >>>>>> Just >>>>>> the relevant part would suffice... >>>>>> >>>>>> About threading notice of pandas it says holding lock in case of >>>>>> multiple dataframe copy, but Jim report he can't even import pandas as >>>>>> pd... So I don't think it the root cause of his issue... But it good to >>>>>> know I wasn't aware of that... >>>>>> >>>>>> Some good read about uwsgi relate to threading : >>>>>> >>>>>> http://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html (search >>>>>> for thread) >>>>>> >>>>>> http://uwsgi-docs.readthedocs.io/en/latest/articles/Serializ >>>>>> ingAccept.html (I notice I have thunder-lock = true in my >>>>>> emperor.ini) >>>>>> >>>>>> I would compare our nginx/uwsgi conf to see if there is not some diff >>>>>> that could explained your issue... I am also curious to know if I could >>>>>> have threading issue with pandas in my app... >>>>>> >>>>>> Richard >>>>>> >>>>>> >>>>>> >>>>>> On Tue, Oct 25, 2016 at 8:32 AM, Jim Steil <ato....@gmail.com> wrote: >>>>>> >>>>>>> Massimo / Michele >>>>>>> >>>>>>> Thanks for the input. I don't know anything about fork only mode. >>>>>>> Looks like I have some reading to do. Thanks again for the input. >>>>>>> >>>>>>> -Jim >>>>>>> >>>>>>> >>>>>>> On Tue, Oct 25, 2016 at 4:02 AM, Michele Comitini < >>>>>>> michele....@gmail.com> wrote: >>>>>>> >>>>>>>> @Jim as per Massimo input, did you check that your uwsgi >>>>>>>> configuration is in fork mode only, no threading? That could be one >>>>>>>> possible cause. >>>>>>>> >>>>>>>> Try also gunicorn instead of uwsgi http://gunicorn.org/ >>>>>>>> >>>>>>>> 2016-10-25 7:19 GMT+02:00 Massimo Di Pierro <massimo....@gmail.com> >>>>>>>> : >>>>>>>> >>>>>>>>> Rocket is a multithreaded server and pandas is not thread safe ( >>>>>>>>> http://pandas.pydata.org/pandas-docs/stable/gotchas.html) be very >>>>>>>>> careful with it. >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tuesday, 16 August 2016 13:19:42 UTC-5, Dave S wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tuesday, August 16, 2016 at 8:50:51 AM UTC-7, Jim S wrote: >>>>>>>>>>> >>>>>>>>>>> Hi >>>>>>>>>>> >>>>>>>>>>> I currently have my app deployed using Ubuntu 14.04 / nginx / >>>>>>>>>>> uwsgi. I have a couple of servers load-balanced behind a haproxy >>>>>>>>>>> server. >>>>>>>>>>> I'm running ssl on the haproxy system and talking http to web2y >>>>>>>>>>> through >>>>>>>>>>> nginx/uwsgi. >>>>>>>>>>> >>>>>>>>>>> Now, I'm trying to upgrade ubuntu to 16.04 and an having issues >>>>>>>>>>> with pandas (used in my web2py app) through the nginx/uwsgi stack. >>>>>>>>>>> See >>>>>>>>>>> this issue for what might be causing it - >>>>>>>>>>> http://stackoverflow.com/questions/19439190/segmentation-f >>>>>>>>>>> ault-while-using-pandas-in-uwsgi >>>>>>>>>>> >>>>>>>>>>> Fixing this error is obviously something beyond my capabilities >>>>>>>>>>> so it got me thinking about alternative deployment options. One >>>>>>>>>>> that I'm >>>>>>>>>>> considering is replacing my nginx / uwsgi stack with just the >>>>>>>>>>> rocket server >>>>>>>>>>> to serve the web2py app. My rocket servers (2 of them) would be >>>>>>>>>>> behind the >>>>>>>>>>> haproxy server so would not be public-facing. >>>>>>>>>>> >>>>>>>>>>> I'm aware of the recommendation against running rocket in a >>>>>>>>>>> production environment but am not aware of the reasons for the >>>>>>>>>>> recommendation. >>>>>>>>>>> >>>>>>>>>>> My question - does running multiple rocket servers behind >>>>>>>>>>> haproxy remove the concerns about rocket in a production >>>>>>>>>>> environment? >>>>>>>>>>> >>>>>>>>>>> -Jim >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> I'm not familiar with Pandas, so I can't comment on that part. I >>>>>>>>>> run rocket, but only a single instance as a development environment. >>>>>>>>>> Perhaps Mariano and Massimo have tested other configurations, but I >>>>>>>>>> think >>>>>>>>>> the bulk of us using rocket only run a single instance. >>>>>>>>>> >>>>>>>>>> What are the specific rocket concerns? Scaling? >>>>>>>>>> >>>>>>>>>> /dps >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>> Resources: >>>>>>>>> - http://web2py.com >>>>>>>>> - http://web2py.com/book (Documentation) >>>>>>>>> - http://github.com/web2py/web2py (Source code) >>>>>>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>>>>>> --- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "web2py-users" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to web2py+un...@googlegroups.com. >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Michele Comitini >>>>>>>> Glisco s.n.c. >>>>>>>> tel: +39 335 66 71 336 >>>>>>>> >>>>>>>> -- >>>>>>>> Resources: >>>>>>>> - http://web2py.com >>>>>>>> - http://web2py.com/book (Documentation) >>>>>>>> - http://github.com/web2py/web2py (Source code) >>>>>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>>>>> --- >>>>>>>> You received this message because you are subscribed to a topic in >>>>>>>> the Google Groups "web2py-users" group. >>>>>>>> To unsubscribe from this topic, visit >>>>>>>> https://groups.google.com/d/topic/web2py/MTOjl8gPuTk/unsubscribe. >>>>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>>>> web2py+un...@googlegroups.com. >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Resources: >>>>>>> - http://web2py.com >>>>>>> - http://web2py.com/book (Documentation) >>>>>>> - http://github.com/web2py/web2py (Source code) >>>>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>>>> --- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "web2py-users" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to web2py+un...@googlegroups.com. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> Resources: >>>>> - http://web2py.com >>>>> - http://web2py.com/book (Documentation) >>>>> - http://github.com/web2py/web2py (Source code) >>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "web2py-users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to web2py+un...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/web2py/MTOjl8gPuTk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.