1. Ed Crewe
  2. django-oraclepool
  3. Issues
Issue #8 resolved

Session Timeout

Anonymous created an issue

If you leave the browser active for more than the alotted timeout in the settings for oraclepool. The connection when refreshing fails with this error message:

Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 280, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python2.4/site-packages/django/core/servers/basehttp.py", line 674, in call return self.application(environ, start_response) File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 248, in call signals.request_finished.send(sender=self.class) File "/usr/lib/python2.4/site-packages/django/dispatch/dispatcher.py", line 162, in send response = receiver(signal=self, sender=sender, **named) File "/usr/lib/python2.4/site-packages/django/db/init.py", line 82, in close_connection conn.close() File "/usr/lib/python2.4/site-packages/oraclepool/base.py", line 339, in close self.pool.release(self.connection) OperationalError: ORA-01012: not logged on Process ID: 0 Session ID: 3526 Serial number: 19675

Comments (5)

  1. Ed Crewe repo owner


    So I guess the issue is here that if you set a time out for Oracle connections that is lower than the time it takes to render a very expensive page then you get this rather ugly error. I guess I could return something a little more user friendly but this would be something that is only fixable by the application developer in any case - and there is nothing stopping the Oracle pool timeout value (via the DATABASE EXTRAS dictionary), to the same as your web server page time out.

    NB: I do not think django-oraclepool should ramp this up automatically though, since the time out is important. So if you had a broken app / bad query that generated a lot of connections that didn't time out, then you could generate many hundreds of Oracle connections / apache threads that could act as a DoS for Oracle or Apache.

    So I will note this as a possible minor fix to add a better time out error handler.


  2. Anonymous

    I have had this same issue when leaving a page open for more then the allotted oracle timeout (10 minutes). Once the connections timeout the page is rendered useless. It seems the like connections should get re-established, rather than causing a horrendous error?

  3. Anonymous

    To that point, if the error was handled better. How would you get your application to handle this error? Seems like there is no place during execution to trap this problem...

  4. Ed Crewe repo owner

    This may now be fixed by release 1.2, contributions from Ricardo del Cid wrt. checking if a connection is still live on use, and Brent Watson for checking that a connection from the pool is also still alive.

    So closing for now. Can always reopen if it proves to still be an issue.

  5. Log in to comment