Hello everyone,

Recently I suffered the problem with the number of session files growing 
very fast in my server. This worried me a lot because the server is a 
development environment with only 4 or 5 testers, so when the number of 
users is higher I guess I will have a big problem with this issue.
I've tried to investigate about this but I'm not expert working with web2py 
or with servers, so I have some questions:

- A session file is created associated to a user each time that user logs 
in. Is this ok?
- My users make a login through auth.login_bare(user, password), does this 
create a session file then?
- What should be the code to remove the session file of a user when he/she 
makes a logout?
- I've set my auth.settings.expiration to 999999999, does this affect to 
sessions too? As far as I know it only affects to when an inactive user is 
automatically logged out, is this correct?
- Testing this I've seen that with no logged users in my server, if I 
manually remove the sessions files, some of them are created again!! Why 
and how? As I said I have no users logged in the server.

Regarding to the logout problem I've seen that my logout method is as 
simple as this:

 def logout():
    if auth.user:
        auth.log_event(auth.messages.logout_log, auth.user)
    session.auth = None

I don't really make a logout of the user so I change my method to this:

 def logout():
    if auth.user:
        print 'check 1'
        auth.logout()
        print 'check 2'
    session.auth = None

But when this method is called, the output is this:
check1

check 2 is never printed so, has the user actually make a logout?

I know they are a lot of questions, but any kind of help will be very 
appreciated.

Kind regards!

-- 
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/groups/opt_out.

Reply via email to