cx_oracle 没有重连机制

python cx_oracle
python cx_oracle
scan724

conn = cx_Oracle.connect('test/test@192.168.137.3/serv')
def testconnect(request):
   xsql="select 'aaa' from dual"
   cur=conn.cursor()
   cur.execute(xsql)
   result = cur.fetchall()
   return HttpResponse(json.dumps(result), content_type="application/json")

OperationalError: ORA-03114: not connected to ORACLE
[04/Jul/2020 18:59:56] "GET /testconnect/ HTTP/1.1" 500 71092
Internal Server Error: /testconnect/
Traceback (most recent call last):
  File "/usr/local/python27/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/local/python27/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/python27/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付 29.90元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值