On Tuesday, 15 October 2013 00:57:41 UTC-5, Andrew W wrote: > > I've found out that a cursor maps to a odbc hstmt. I also found out that > Teradata supports 16 open result sets (hstmt) for each session. So it > appears that web2py is reusing the same database session for multiple > simultaneous requests, or isn't closing them correctly before starting the > next request. > > To rephrase my question a bit, Does a web2py connection equate to a > database session ? >
yes but, if the connection is recycled, a new session is created for the same connection, > Does a new request reserve a connection until it's complete, i.e > another request can't issue database statements simultaneously on the same > connection ? > correct. > > So, I think the closing of a connection, or the returning of it to the > pool, is not working properly on Teradata. Perhaps the cursors are staying > open and new cursors are created instead of reusing the existing ones (with > pool_size>0). > A new cursor is created when a connection is recycled (pool_size>0). > I see there is a self._adapter.close() line in dal.py (line 8056) so I > may need to add something to the TeradataAdapter to make this more robust. > This is possible. We close the connection (when necessary) but I do not think there is a concept of closing a cursor. How would you close it on Teradata? > > Does that sound right ? 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/groups/opt_out.