Hi,
I'm having problems with oracle driver used in gevent mode (sqlalchemy + flask - runing in gevent http server or in uwsgi gevent mode).
SQLAlchemy (0.9.8) , cx-Oracle (5.1.3) connection to Oracle 11.2 with Oracle driver Client Shared Library 64-bit - 11.2.0.4.0
OS is Ubuntu 14.04, python 2.7.6
When first query is to be executed I got following error (abreviated):
...
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 416, in __init__
exec_once(self.connection, self)
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/event/attr.py", line 250, in exec_once
self(*args, **kw)
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/event/attr.py", line 260, in __call__
fn(*args, **kw)
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 1219, in go
return once_fn(*arg, **kw)
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 166, in first_connect
dialect.initialize(c)
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py", line 765, in initialize
self._detect_decimal_char(connection)
File "/home/ivan/workspace/josefovina/local/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py", line 799, in _detect_decimal_char
char = re.match(r"([\.,])", val).group(1)
File "/home/ivan/workspace/josefovina/lib/python2.7/re.py", line 137, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or buffer
After that next queries then work fine - only until connection expires - then I got an error (again abreviated):
...
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 729, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1159, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute
cursor.execute(statement, parameters)
File "./sqlalchemy_gevent.py", line 14, in __call__
return self.threadpool.apply_e(BaseException, self.func, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/gevent/threadpool.py", line 225, in apply_e
raise result
OperationalError: (OperationalError) ORA-03113: end-of-file on communication channel
Process ID: 24217
Session ID: 133 Serial number: 255
'INSERT INTO ...
regular version of driver( non gevent) works fine.
Seems to be something wrong with life-cycle of connection - Inital error - this when query is run as part of connection setup. And the second error looks like expired/stalled connection is not removed from pool?
Hi,
I'm having problems with oracle driver used in gevent mode (sqlalchemy + flask - runing in gevent http server or in uwsgi gevent mode).
SQLAlchemy (0.9.8) , cx-Oracle (5.1.3) connection to Oracle 11.2 with Oracle driver Client Shared Library 64-bit - 11.2.0.4.0
OS is Ubuntu 14.04, python 2.7.6
When first query is to be executed I got following error (abreviated):
After that next queries then work fine - only until connection expires - then I got an error (again abreviated):
regular version of driver( non gevent) works fine.
Seems to be something wrong with life-cycle of connection - Inital error - this when query is run as part of connection setup. And the second error looks like expired/stalled connection is not removed from pool?