Hello Anthony, Is that normal that multiples sessions files get created in case of FS sessions??
Regards Richard On Wed, Apr 4, 2018 at 3:09 PM, Anthony <abasta...@gmail.com> wrote: > One potential downside of db sessions is that you can have race > conditions, as the session record does not get locked (unless something has > changed). On the plus side, if you have multiple Ajax requests that all > just need to read (but not write to) the session, they can be handled > simultaneously (with file based sessions, because the session file is > locked by each request, multiple Ajax requests must be handled one at a > time, which is safer, but also slower). > > Anthony > > > On Wednesday, April 4, 2018 at 1:28:18 PM UTC-4, Richard wrote: >> >> DB sessions are so much more convenient... you only need one connection, >> not need to access remote server or sudo password etc... >> >> Walk the extra mile and set a cron job for session2trash clean up and you >> now have one less thing to check for... >> >> Depending on your workload, you don't have to do clean up as often than 5 >> min interval. >> >> Here my conf : >> >> # CRON /etc/crond.d/ >> # m h dom mon dow user command >> 0 8-17/1 * * 1-5 root /opt/scripts/sessions2trash.sh >> >> # Bach script >> >> python /home/www-data/web2py/web2py.py -S APPNAME -M -R >> scripts/sessions2trash.py -C -A -o >> # -A : should be followed by a list of arguments to be passed to script, >> to be used with -S, -A must be the last option >> # -o : args passed to sessions2trash.py which "Delete sessions, then >> exit." >> # NOTE if it's omitted, processes get spawned but not killed >> >> >> Good luck >> >> Richard >> >> On Wed, Apr 4, 2018 at 11:06 AM, AlighaThor < >> alighathor88caribb...@gmail.com> wrote: >> >>> Well, I will stick with DB sessions from now. >>> >>> Thanks! >>> >>> -- >>> 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 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 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.