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 Niphlod for your help! El viernes, 20 de marzo de 2015, 21:15:46 (UTC-3), Niphlod escribió: > > 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 in > their own session) wouldn't spot anything, and you'll get your table - > hopefully - down to a manageable size. > > BTW, if you didn't purge sessions regularly (i.e. you just started > recently), and your script is failing to fetch the data - because it's not > printing anything - it's probably accumulating. > Unfortunately, sessions2trash.py isn't very keen to a very large table, > and much depends on how much data you store per session. If that table is > holding 1GB of data, it gets stored in memory by the select that is > fetching the records to inspect them. > > > On Saturday, March 21, 2015 at 1:05:31 AM UTC+1, Lisandro wrote: >> >> 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 available: sqlite3, pymysql, psycopg2, pg8000, imaplib >> e4b39c2b-f6c4-442a-b352-211c2fcc3474 trashed >> a6166534-cc6e-49ef-9900-30f8ad299cc6 trashed >> bdbc3d14-ff5e-49c6-a2d6-7f2e7ea83fd7 trashed >> c169ee4b-dc48-410c-9342-a85571d41d36 OK >> 78182dcf-0738-4534-a394-98cdb320ecba OK >> b209819e-c5d7-4ba0-a922-0546a4d34bdc OK >> >> Then, I ran the script for other site, and there was no session trashed >> or "ok", however, the execution time was around 30 seconds or more, and >> during that time, I could see how the swap started increasing and also CPU. >> >> I read a little more about sessions, and I noticed that, when storing >> them in the db, there is a table called, in this case, >> "web2py_session_init", so I checked the count of records, and I found out >> that one of the websites has **a lot** of records in that table, >> specifically, 1712710 records :P >> >> So I guess that's the problem, I don't know how much would web2py take to >> clear all that sessions, but I guess that's a lot of records to handle. >> >> Question: can I just delete all records on that table? Would that cause >> any trouble to users? Or would they just be asked to login again? >> >> El viernes, 20 de marzo de 2015, 20:18:57 (UTC-3), Niphlod escribió: >>> >>> 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 >>> - how many sessions are you clearing >>> >>> -- 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.