Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-26 Thread Niphlod
tl;dr: don't ever put here what are the sites you manage, you may get someone like me on the other end and he'd not be pleased :-P I must say I didn't fully understand that. Do you mean I shouldn't put here the domains I manage? Or do you mean that I should tell what are the sites

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-26 Thread Lisandro Rostagno
2015-03-21 18:19 GMT-03:00 Niphlod niph...@gmail.com: This last post is a dream come true for my boss. Glossary: - developer -- someone that can create logics in programs, coding in some programming language - sysop -- someone who knows inside out every bit of the pieces the developer uses

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro
Problem solved! The problem was, in effect, the large quantity of records on the web2py_session_init table. So I did a manual delete on the table, and then I could successfully add the sessions2trash.py script to the cron configuration. So far, everything is working ok. Thank you very much

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro
Hello Massimo. I'm not really sure about my answer, but that's a question I've asked myself in the past. Let me clarify: in my company we offer auto-administrable websites (for newspapers, magazines, organizations, bloggers). What we have is a main web2py app called panel, that is pretty much

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Massimo Di Pierro
You can definitively handle this with one single web2py instance and you would save lots of memory (not CPU, only memory, but it may be worth). Since you are using this in production, my recommendation is to use nginx and use nginx.conf to map subdomains into apps. Each domain would have it

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Lisandro Rostagno
Thank you Massimo, I will try that, I think I'm going to play a little on a testing server and then go to production. One thing that I was concerned about was the assignment of resources. Considering that our clients choose a plan, I need to limit resources per every website accordingly to the

Re: [web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-21 Thread Niphlod
This last post is a dream come true for my boss. Glossary: - developer -- someone that can create logics in programs, coding in some programming language - sysop -- someone who knows inside out every bit of the pieces the developer uses to make programs work - devop -- someone who is a coder,

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-20 Thread Lisandro
Sessions are stored on the db. I'm using postgresql, and this is part of my code on db.py model: db = DAL('postgres://%s:%s@%s/%s' %(DB_USER, DB_USER_PASSWORD, DB_HOST, DB_NAME), lazy_tables=True) session.connect(request, response, db=db, masterapp='init') As you can see, I'm using masterapp

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-20 Thread Niphlod
you can check with the verbose option the things you could be interested in (and helping me/us understand the possible issues): - if cleaning on panel right after cleaning init actually cleans up something -- it shouldn't if your masterapp is always init - how many sessions are you inspecting -

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-20 Thread Niphlod
they'll loose session data. if they are logged in, they would be asked to login again. To alleviate the issues, you could delete all records that have a modified_datetime older than some value in the past, e.g. 2 days ago. Currently logged in users (that are probably storing/changing something

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-20 Thread Lisandro
I've already tried with -v option for verbose output, but nothing special is shown. I've just ran the script for one of the sites, and the output was ok: web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2015 Version 2.9.12-stable+timestamp.2015.01.17.06.11.03 Database drivers

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-20 Thread Massimo Di Pierro
You say I'm using we2py in production to serve about 15 websites, each one of them is served by it's own web2py installation. Why? Why not a single web2py running? Do the difference instances run on the same server and different ports? On Friday, 20 March 2015 17:33:15 UTC-5, Lisandro wrote:

[web2py] Re: Performance problems when executing the sessions2trash.py script

2015-03-20 Thread Niphlod
are sessions stored on files, db, memcache or redis ? On Friday, March 20, 2015 at 11:33:15 PM UTC+1, Lisandro wrote: I'm using we2py in production to serve about 15 websites, each one of them is served by it's own web2py installation. I want to clean up expired sessions every certain