[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-07 Thread Leonel Câmara
You can make a pull request with your fixes in github if you know how to fix it or you can open an issue in github. https://github.com/web2py/web2py -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.c

Re: [web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-07 Thread Jim Steil
Leonel - what's the process to get this fixed in web2py? I don't think I know enough about the redis library to offer a fix. I also found a couple bugs in the ubuntu/nginx/uwsgi install script. Would it make sense to make these install scripts version specific? -Jim On Fri, Dec 7, 2018 at 11:1

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-07 Thread Leonel Câmara
Whoa nice find: redis-py 2.X attempted to coerce any type of input into a string. While occasionally convenient, this caused all sorts of hidden errors when users passed boolean values (which were coerced to ‘True’ or ‘False’), a None value (which was coerced to ‘None’) or other values, such as

Re: [web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-07 Thread Jim Steil
WooHoo! I think I finally figured it out. Python redis package was at a different level on the other machine. Python redis 2.10.6 works Python redis 3.0.1 does not. Seems to only want strings passed to it. On my new server I -> pip install redis==2.10.6and now it works. By default it is

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-07 Thread Leonel Câmara
That's the same as locked=True as the string 'False' evaluates is a Truthy value. What you should try is to use: RedisSession(redis_conn=rconn, session_expiry=False, *with_lock=True*) Notice the added with_lock=True -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-06 Thread Jim S
Ok, I appear to have it working: Here's what I did. I need someone much smarter than me to determine whether or not this is wise: Original web2py/gluon/globals.py at line 1230 dd = dict(locked=False, client_ip=response.session_client, modified_datetim

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-06 Thread Jim S
Yes, same result. I clear history/cookies and still got the message I tried a private window and it happened. Also got the same result testing from a different browser. -Jim On Thursday, December 6, 2018 at 3:37:10 PM UTC-6, Leonel Câmara wrote: > > Does this still happen if you clear the cook

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-06 Thread Leonel Câmara
Does this still happen if you clear the cookies in the browser (or use a private window) before visiting the URL? -- 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 Issu

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-06 Thread Jim S
And another thing...This fails on the server with the rocket webserver as well as with the nginx/uwsgi server. -Jim On Thursday, December 6, 2018 at 11:42:18 AM UTC-6, Jim S wrote: > > Also > > I have another desktop linux machine here running Ubuntu 18.10 and this > all works just fine. T

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-06 Thread Jim S
Also I have another desktop linux machine here running Ubuntu 18.10 and this all works just fine. The web2py version there is: web2py™ Version 2.17.2-stable+timestamp.2018.10.06.18.54.02 so I tried that on the failing server and it too fails with the same traceback. Same python version, same

[web2py] Re: New production install Ubuntu/nginx/uwsgi - connect to redis

2018-12-06 Thread Jim S
I've narrowed this down a little bit: Here is the code at the top of my db.py: from gluon.contrib.redis_utils import RConn from gluon.contrib.redis_session import RedisSession rconn = RConn(ccfg.redis.server, ccfg.redis.port) sessiondb = RedisSession(redis_conn=rconn, session_expiry=False) sessio