I was checking memory usage and noticed that the sessions folder (under one
specific application) takes over 1G of disk space. Can I just delete
everything in there? Trying to clean up the space to optimize disk usage -
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
Hello All,
I will try to present my problem simply :
I have a web2py application with a very simply homepage user.html
User and Password labels & Login Button are automatically translatedby
Firefox
in Firefox the detected langage
If a user enter login / password
I check user permissions
On Monday, February 17, 2020 at 3:33:39 AM UTC-8, Frédéric Samson wrote:
>
> Every scheduler task that is running stores a session in my database. Is
> there a way to not to store the session when request.is_scheduler is true?
>
Google doesn't make it clear, but checking "show at the top" shoul
Try
session._forget = True
Yet this should not be happening so hard to suggest a fix without seeing
the code.
On Monday, 17 February 2020 17:44:32 UTC-8, Frédéric Samson wrote:
>
> I tried this in the model file :
>
> if request.is_scheduler:
> session.forget(response)
>
> and
>
> if reques
I tried this in the model file :
if request.is_scheduler:
session.forget(response)
and
if request.is_scheduler:
session.forget()
but it still store sessions in the database.
Le lundi 17 février 2020 09:54:43 UTC-5, Massimiliano a écrit :
>
> Have you tried if
>
> *session.forget(response)* o
Have you tried if
*session.forget(response)* or *session.forget() *can help you?
http://web2py.com/books/default/chapter/29/04/the-core?search=session.forget#session
On Mon, Feb 17, 2020 at 12:33 PM Frédéric Samson
wrote:
> Every scheduler task that is running stores a session in my database.
Every scheduler task that is running stores a session in my database. Is
there a way to not to store the session when request.is_scheduler is true?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com
Hi.
I am using sessions and Ajax (via web2py's LOAD), and finding that in the
main view's code I can call the session as normal, but in the code for the
component the session is not accessible and the error messages suggest that
it's a local variable: -
UnboundLocalError: local variable 'sessi
>
> About locking sessions, I see there is a "locked" boolean field in the
> sessions table. What's stands for? I mean, I expect that it has something
> to do with sessions locking, but when and where it is triggered?
>
As far as I can tell, that field is not actually used for anything. Maybe
Sorry for my delay. Thanks both Anthony and Richard for your excellent
explanations!
Well, I changed for now to DB sessions. The settings mentioned by Anthony
about renewing sessions are great, I did'nt know that. Anyway I still found
that DB handling is by far easier/scalable/performant to me.
Thank you Anthony as always very clear explanations.
:)
Richard
On Wed, Apr 4, 2018 at 5:19 PM, Anthony wrote:
> This behavior is controlled by the following auth.settings:
>
> renew_session_onlogin (default=True)
> keep_session_onlogin (default=True)
> renew_session_onlogout (default=True)
>
This behavior is controlled by the following auth.settings:
renew_session_onlogin (default=True)
keep_session_onlogin (default=True)
renew_session_onlogout (default=True)
keep_session_onlogout (default=False)
Renewing the session causes a new session ID and therefore file to be
created -- that e
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 wrote:
> One potential downside of db sessions is that you can have race
> conditions, as the session record does not get locked (unless som
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
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 clea
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 subscribe
About session clean up, I recently set it in place (finally) and I can
assure you that db sessions get cleared as expected.
About the FS sessions, I can say for sure but maybe it faster to just
create another file than search the exsting file, then append or rewrite
part of it...
Finally it surel
Hi. I'm experimenting for the first time (but I'm quite a bit old using
this amazing framework :)) storing sessions in the DB instead the
filesystem, as I always did. I'm monitoring those two behaviours and
somehow it feels (at least for me) that the DB session handling is far away
more efficie
Using 2.12.1
I run a small site... about 200 members who login (some using the 'Remember
me for 30 days') plus about 1500 public visitors per day. The sessions are
stored in the file system. I run the sessions2trash.py script once a day. I
have noticed the sessions are increasing by about 1000
>
> To *store sessions in cookies* instead you can do:
>
> session.connect(request,response,cookie_key='yoursecret',compression_level=None)
I do that - but folders continue to created in app/sessions
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.co
Hi all,
Has anyone run into this problem? If you use Redis to store sessions, when
logging out, the following error is thrown. I'm looking into i8t myself,
but thought others may have run into it as well.
Thanks
Rod
'MockQuery' object has no attribute
'delete'
Versionweb2py™Version 2.9.12-sta
Cool
I learnt a lot from this thread.
I used to delete "everything" from both DB as well as
applications/myapp/databases folder
I think later contains *.table files. I didn't know that I can remove
individual *.table files.
Also did not know about fake_migration. Gotta try it sometime.
In pro
Hello Austin,
I apologize I have overlooked your message and I would like to help with
the problem. There seem to be thre distinct problems:
1) In your original post the "web2py_session_runstone.table" was there but
the database had no knowledge of the table. This can only happen if the
table i
Ah, apologies. I was a little over-enthusiastic with my deletions.
So I did fake_migrate_all=True, let web2py create the tables, and then
turned off fake_migrations. However, web2py did not create a
web2py_session_runestone table file. All the other tables are there, just
no web2py_session_rune
who said "delete everything" ? :P
now, do a fake_migrate_all=True, let web2py recreate table files, then turn
off fake_migrations, then delete ONLY webp2y_session_runestone and retry.
Simone
On Thursday, July 3, 2014 11:30:35 AM UTC+2, Austin Bart wrote:
>
> Migrations should be on. I have it e
Migrations should be on. I have it enabled through my DAL:
db = DAL(settings.database_uri, migrate_enabled=True)
And through each individual table:
db.define_table('courses', ... migrate='runestone_courses.table')
I've emptied the entire databases/ folder of all the .table files.
This seems to hav
did you turn migrations on ?
if yes, please check that there isn't a *web2py_session_runestone*.table
file into the database/ folder. If there is, delete it and web2py will
recreate it.
On Thursday, July 3, 2014 1:44:38 AM UTC+2, Austin Bart wrote:
>
> Recently after some updates to some of my m
Recently after some updates to some of my models, I got this error in
web2py.
Traceback (most recent call last):
File "/Users/acbart/web2py/gluon/main.py", line 457, in wsgibase
session._try_store_in_db(request, response)
File "/Users/acbart/web2py/gluon/globals.py", line 1116, in _try_
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 issu
Hi,
I have a web2py installation and an ejabberd for chat connections. Due to
the speed of ejabberd, I want to transfer some of the ajax requests to
ejabberd. This will require me to perform user authentication at EjabberD
instead of web2py.
Is there way I can authenticate an user at Ejabberd
Hello,
I came across an issue when retrieving session data. I simplified the
app to basically this code in a model:
# -*- coding: utf-8 -*-
try:
session.i += 1
except:
session.i = 1
It works fine in a fresh new application (i.e. session.i increases its
value).
If I switch to use sqlite f
I noticed that I get the "too many files open" error with all my new
sessions that are created. Would this be a problem when we have REALLY
buys connections of people on a page and we need to keep track of all
the session information? Should there be a way to adjust or handle the
situation? I
I think that to maintain the state, you can store the session in db,
(someone puts a link about it )
If there is a cookie, web2py checks if the session data exists
automatically.
2010/8/6 Bruno Rocha
> If I understand, he wants to save session values, even the user closes the
> browser and re
If I understand, he wants to save session values, even the user closes the
browser and returns after.
if you set e.g one week to the cookie time limit, this will keep the
reference to the session ID, but I dont think this will automaticaly keep
the session values. ( what if the server restarts?)
You just have to set a time limit to your session/cookie, like a week, month
or year.
I'm sure massimo answer how to set a diferent time limit to a cookie before.
2010/8/5 Cody
> Hello,
>
> I just started using web2py this summer to create a website.
>
> Currently, I am having an issue with
The problem that Session variables have to overcome is that the HTTP
protocol that you use to browse the web is stateless. Each request for a
page is completely independant of earlier requests, so if you want to
"remember" the variables you have to store that information somewhere. This
rememberin
Hello,
I just started using web2py this summer to create a website.
Currently, I am having an issue with sessions. I am trying to store
information in session variables without having the user login, but
whenever the browser closes and reopens all the session variables are
reset. I am only storin
I've started seeing the following warning on the logging console:
/gluon/sql.py:739: Warning: Out of range value adjusted for column
'locked' at row 1
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
I'm assuming it's related to the sessions table (since I'm keeping my
sessions in
38 matches
Mail list logo