I guess the book needs some cleanup in this respect.

I normally expire sessions in the model iteself. No cron and no
process.

On Jan 5, 10:08 pm, John Heenan <johnmhee...@gmail.com> wrote:
> I am a bit of a loss though as to why page 121 provides the following
> web2py specific web2py/applications/xxx/cron/crontab entry example for
> expiring sessions:
>
> @hourly root *applications/admin/cron/expire_sessions.py
>
> AND why page 123 provides an example of how to run web2py crontabs
> from /etc/crontab (called 'hard cron' by web2py):
>
> 0-59/1 * * * * web2py cd /var/www/web2py/ && python web2py.py -C -D 1
>
> >> /tmp/cron.output 2>&1
>
> YET page 302 in the the deployment recipes section appears to prefer
> keeping a python process lying around in memory to expire sessions
> that is only used relatively infrequently.
>
> I imagine most of us on this list are severely constrained with regard
> to resources for live deployment of web2py. I use a 256MB VPS and make
> sure I only run the absolute minimum number of processes. Some on this
> list will have even even less memory available (such as if using
> webfaction).
>
> I have only one process running that goes above 3MB memory use: a
> single persistent python process that runs all my web2py apps and uses
> 37MB of memory . The webserver (lighttpd) occupies 2.3MB and does not
> fork. These memory sizes occupy RAM and swapped memory if not enough
> RAM memory is available. The potential memory use of python is 236MB
> (VSZ size).
>
> Under these circumstances the web2py labelled 'soft cron' option is
> attractive as no extra processes are spawned: the python process that
> runs web2py runs web2py specific crontabs in web2py/applications/xxx/
> cron/crontab.
>
> John Heenan
>
> On Jan 6, 2:11 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > thanks
>
> > On Jan 5, 9:48 am, John Heenan <johnmhee...@gmail.com> wrote:
>
> > > On Jan 6, 1:40 am, John Heenan <johnmhee...@gmail.com> wrote:
>
> > > > Here is a hint for using the book listed command
> > > > nohup python web2py.py -S yourapp -R scripts/sessions2trash.py &
> > > > in /etc/rc.local, to enable automatic start of this script on boot.
>
> > > This hint is of course only relevant if you don't already use /etc/
> > > rc.local to start up web2py. I use a scrpt in /etc/init.d instead to
> > > start up web2py.
>
> > > John Heenan
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to