Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-10-12 Thread Richard Vézina
Check permissions... Richard On Mon, Oct 10, 2016 at 1:34 PM, Arve Fahlvik wrote: > What was the solution? Seems like I have a similar problem. > > Arve > > On Thursday, January 21, 2016 at 10:05:57 AM UTC+1, Johann Spies wrote: >> >> On 20 January 2016 at 16:35, Richard Vézina >> wrote: >> >>

Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-10-11 Thread Arve Fahlvik
What was the solution? Seems like I have a similar problem. Arve On Thursday, January 21, 2016 at 10:05:57 AM UTC+1, Johann Spies wrote: > > On 20 January 2016 at 16:35, Richard Vézina > wrote: > >> >> Which user is regular "web" user under debian, www-data? >> >> > Yes. > > Thanks it is worki

Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-01-21 Thread Richard Vézina
:) Richard On Thu, Jan 21, 2016 at 4:05 AM, Johann Spies wrote: > On 20 January 2016 at 16:35, Richard Vézina > wrote: > >> >> Which user is regular "web" user under debian, www-data? >> >> > Yes. > > Thanks it is working now. > > Regards > Johann > > -- > Resources: > - http://web2py.com > -

Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-01-21 Thread Johann Spies
On 20 January 2016 at 16:35, Richard Vézina wrote: > > Which user is regular "web" user under debian, www-data? > > Yes. Thanks it is working now. Regards Johann -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-01-20 Thread Richard Vézina
As Simone says, it seems clear that it come from permission... Which user is regular "web" user under debian, www-data? Even if it not the main issue, I would rather start debuging and make work the 80 port before trying 443... First link if I google the bind() error : http://stackoverflow.com/q

Re: [web2py] Re: Nginx-uwsgi problem.

2012-08-27 Thread Johann Spies
On 26 August 2012 23:05, apps in tables wrote: > Hi, > > where can i find tree example(file system) built by web2py ? > > In the Web2py directory tree? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

Re: [web2py] Re: Nginx-uwsgi problem.

2012-08-26 Thread apps in tables
Hi, where can i find tree example(file system) built by web2py ? Regards, Ashraf On Monday, May 14, 2012 6:33:07 PM UTC+3, Ross Peoples wrote: > > I'm reading through the profile log, not that I'm an expert on profiling > or anything, but I do have a few possible tips: > >1. Most of your c

Re: [web2py] Re: Nginx-uwsgi problem.

2012-06-12 Thread Marco Tulio Cicero de M. Porto
We've been testing NginX for a while now, but we're still not using it on production. We've used a script from this group to install/configure nginx/web2py/uwsgi. This script created a web2py configuration file on sites-available with configurations for HTTP and HTTPS. The one error message we get

Re: [web2py] Re: Nginx-uwsgi problem.

2012-06-11 Thread pbreit
Probably going to need a lot more information. Have you used Nginx before? What does nginx.conf look like? Are you getting any error messages? Nginx error log? Do you have to kill nginx, uwsgi or web2py to run again?

Re: [web2py] Re: Nginx-uwsgi problem.

2012-06-11 Thread Ovidio Marinho
We have an application running under apache2 with 51 tables in postgres and runs very well on apache, when put to run with the postgres nginx a request timeout error appears and locks the web-server. What might be happening? which the configuration to run web2py + postgresql + nginx?        Ovi

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-22 Thread Bruce Wade
OK so here is a little bit before and after I still have a lot of work to do: Before: / Sat May 12 15:39:07 2012profiler.log.tmp 85845 function calls (84497 primi

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Bruce Wade
Yes, I have started moving everything from models to custom api modules this weekend. I am going to try to use most of the tips provided by everyone. For the adviewer I will look to see what is calling 10 query's. However I can not cache this query as the returned ads most be random for every use

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Massimo Di Pierro
If one has more than 10 tables, one should use conditional models and one should move all state dependent settings into the controllers that need them, Massimo On Monday, 14 May 2012 11:36:00 UTC-5, pbreit wrote: > > Aren't 135 table definitions going to be a problem in a high volume app? > Ar

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread pbreit
Aren't 135 table definitions going to be a problem in a high volume app? Aren't many/most of those 85k-100k function calls going to examining/parsing all those tabledefs?

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Anthony
On Monday, May 14, 2012 12:06:28 PM UTC-4, Ross Peoples wrote: > > The problem with doing it as a C module is that it would have to be > compiled. I know that this is something that has been mentioned before but > was shot down because web2py wouldn't be easily accessible, modified, etc, > which

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Anthony
> > If you want to use db.executesql() but remain portable, you can still have >> the DAL generate the SQL for you by using the ._select() method: >> >> db.executesql(db(query)._select(...)) >> >> Obviously in that case you don't get to hand optimize the SQL, but you >> still get the speed advan

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Richard Vézina
Yes right, it could not be anymore included into a single zip file that you just unpack and good to go. About PyPy, I read long time ago from someone that has make works web2py with it that there was not that much speed improvement. Richard On Mon, May 14, 2012 at 12:06 PM, Ross Peoples wrote:

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Richard Vézina
This is cool : cache.ram.clear(key) I didn't thought about it, I figure out that you trigger this in the function that create new records for a given cached select... Good trade off with caching and up to date select. Thank for this one Ross. Richard On Mon, May 14, 2012 at 12:02 PM, Ross Peop

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
The problem with doing it as a C module is that it would have to be compiled. I know that this is something that has been mentioned before but was shot down because web2py wouldn't be easily accessible, modified, etc, which is the goal of web2py. Alternatively, maybe running web2oy in PyPy envi

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
On Monday, May 14, 2012 11:50:06 AM UTC-4, Anthony wrote: > > >>1. Your "adviewer/viewads" makes 10 calls to the database. Try to >>optimize this either by writing fewer queries, creating a view, and/or >> only >>selecting fields that you need. Also make sure you get the criteria r

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Richard Vézina
Hello, I wonder if some of the speed problem that web2py has could be address by translate some of the web2py module into C?? There is already many walk around for speed problem, but could there is some major speed improvement by rewrite some of web2py fondation into C? I am just curious about t

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Anthony
> > >1. Your "adviewer/viewads" makes 10 calls to the database. Try to >optimize this either by writing fewer queries, creating a view, and/or > only >selecting fields that you need. Also make sure you get the criteria right >so that you (ideally) don't have any extra, unneeded

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
I'm reading through the profile log, not that I'm an expert on profiling or anything, but I do have a few possible tips: 1. Most of your calls are done in ~86 ms. That's pretty respectable. 2. Most of your time is spent on database calls, with compiling being the second biggest time co

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-13 Thread Anthony
On Sunday, May 13, 2012 8:37:17 PM UTC-4, Bruce Wade wrote: > > How will compiling it effect things as we are actively developing and > adding new features almost daily? > After you make a change, you can just do "Remove compiled" and then re-compile. You can do it via the admin interface or the

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-13 Thread Bruce Wade
How will compiling it effect things as we are actively developing and adding new features almost daily? On Sun, May 13, 2012 at 5:17 PM, Anthony wrote: > To cut define_table execution time you could try to put migrate=False, >> fake_migrate=False, when you call the DAL since in production the >>

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-13 Thread Anthony
> > To cut define_table execution time you could try to put migrate=False, > fake_migrate=False, when you call the DAL since in production the > model does not change (usually) at runtime. > Yes, definitely turn off migrations -- you can do so for the entire connection via: db = DAL(..., mig

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-13 Thread Bruce Wade
Youadworld is HUGE some tables even have 50 columns. On May 13, 2012 2:59 PM, "pbreit" wrote: > 135 tables to run YouAdWorld??

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-13 Thread pbreit
135 tables to run YouAdWorld??

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-13 Thread Michele Comitini
The first numbers to look at are times those are what affect our lives. The number of calls bother just the cpu ;-) 1. time to complete the action 2. cumulative time i.e. where most of the time affecting 1. is spent 3. percall time i.e. to find if there is a function that is really slow 1. is ar

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Bruce Wade
Shouldn't be as I have deleted that default function. On May 12, 2012 4:36 PM, "Bruno Rocha" wrote: > Do you have images being seved by web2py using the default download > function? > > On Sat, May 12, 2012 at 7:51 PM, Bruce Wade wrote: > >> Ok so I started it with the profile to be honest need

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Bruno Rocha
Do you have images being seved by web2py using the default download function? On Sat, May 12, 2012 at 7:51 PM, Bruce Wade wrote: > Ok so I started it with the profile to be honest need some guidance on how > to read this report. But like the one call there is 582,237 function calls > that looks

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Bruce Wade
lol, yeah I guess that is my problem with being a C++ coder. But I also seen that 90 tables were loaded with every request ;) On Sat, May 12, 2012 at 1:50 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > I keep saying it but nobody listens :-) > > USE THE PROFILER > > You wasting *your

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Michele Comitini
I keep saying it but nobody listens :-) USE THE PROFILER You wasting *your* time trying to guess where the application is wasting *its* time. mic 2012/5/12 Anthony : > On Saturday, May 12, 2012 12:06:28 PM UTC-4, Bruce Wade wrote: >> >> Yeah I am going through all my controllers right now to se

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Anthony
On Saturday, May 12, 2012 12:06:28 PM UTC-4, Bruce Wade wrote: > > Yeah I am going through all my controllers right now to see if I can use > the folder solution. Which way would be faster? Folders or modules? > Well, a model file still has to be read each time it is needed, whereas a module rem

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Bruce Wade
OK so I am working on this technique what do you think? API File: youadAPI.adviewer_api from gluon import * class AdViewerEngine: class tables: AdReports = 'adreports' Ads = 'ads' AdveiwerSettings = 'adviewer_settings' Keywords = 'keywords' AdKeyword = '

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Bruce Wade
Yeah I am going through all my controllers right now to see if I can use the folder solution. Which way would be faster? Folders or modules? On Sat, May 12, 2012 at 8:52 AM, Anthony wrote: > On Saturday, May 12, 2012 10:51:59 AM UTC-4, Bruce Wade wrote: >> >> I am starting to think the design lo

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Anthony
On Saturday, May 12, 2012 10:51:59 AM UTC-4, Bruce Wade wrote: > > I am starting to think the design loading everything in models with every > request, all though makes for rapid development isn't a very good design. > Maybe for common settings in witch case the folder shouldn't be called > mode

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-12 Thread Bruce Wade
I am starting to think the design loading everything in models with every request, all though makes for rapid development isn't a very good design. Maybe for common settings in witch case the folder shouldn't be called models. I need to go through my app completely and remove everything from model

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-11 Thread Michele Comitini
> Connections = (pool_size) * (number of web2py processes) > > So if you have 10 threads  and pool_size = 4 > 1 * 4 = 4 connections > > If you have 10 processes (each with 6 threads): > 10 * 4 = 40 connections > > As you can see the number of processes is not a term of the computation. > You must c

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-11 Thread Michele Comitini
2012/5/11 Bruce Wade : > Maybe in some places of the code but not everywhere. The problem is when > there is a large load all 3 servers get very slow on every page. I think it > is the DB layer as we have 90 tables in one database 45 in another. I am > also using connection pooling which I think is

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-11 Thread Bruce Wade
Maybe in some places of the code but not everywhere. The problem is when there is a large load all 3 servers get very slow on every page. I think it is the DB layer as we have 90 tables in one database 45 in another. I am also using connection pooling which I think is causing problems. Because the

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-11 Thread Richard Vézina
Bruce, Are you building dict with query for represent or other use? Recently I solve speed problem I had by caching dict building query. I never thought that building a dictionary could be that expensive in term of cpu load. Richard On Thu, May 10, 2012 at 5:13 PM, Bruce Wade wrote: > Yes th

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Bruce Wade
Yes there are a LOT of wait state on the web2py nodes and high CPU I will try your suggestions. Thanks, Bruce On Thu, May 10, 2012 at 2:10 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > The high load on web2py nodes seems to point to code in web2py. If it > were a problem with pos

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Michele Comitini
The high load on web2py nodes seems to point to code in web2py. If it were a problem with postgres you would have a high load on postgresql and a lot of wait state and little CPU time resulting in little uptime on web2py nodes but long page rendering times. I suggest to try to convert some logic t

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Bruce Wade
Web2py is on 3 different servers/nodes, postgresql is on it's own node with 8GB ram. CPU is being used by uwsgi so web2py. The slowness I think is from DB queries as when you load a page without the DB involved much it loads quickly The serving ads part is not a problem it is the other pages on t

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Michele Comitini
Is the high load caused by web2py process or postgresql? Is web2py on the same machine as postgresql? Use top or htop to find which process uses the CPU. If it is web2py *use* the profiler. If it postgres try to find the bad query and try to improve it by using EXPLAIN. Could be also the swapping

Re: [web2py] Re: Nginx-uwsgi problem.

2011-09-19 Thread Bruno Rocha
The verification email has been sent! But I am using a feature that allows first login without registration, but you will not be able to login again I will include a captcha... de rifar...@gmail.com para d...@dfgdfg.pl data 19 de setembro de 2011 06:27 assunto Bem-vindo, confirme seu e-mail