Jython 上的 Django 和 Oracle:打开的游标太多
我在 Jython 和 Oracle 上运行 Django,经常得到著名的
“打开的游标太多”
错误。
使用 Python 和 cx_Oracle 驱动程序使用相同的代码永远不会发生这种情况。
zxJDBC 驱动程序是否有问题,或者也许有一种方法可以要求 Django 在我完成查询集时关闭游标?
谢谢,
斯蒂芬
I am running Django on Jython with Oracle and I often get the famous
"Too many open cursors"
error.
It never happens with the same code with Python and the cx_Oracle driver.
Is there something wrong with the zxJDBC driver or perhaps there is a way to ask Django to close the cursors when I am done with the querysets?
Thanks,
Stephane
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说听起来像是一个结束问题。
我认为
with
关键字应该有助于关闭 Python 中的资源。我不知道连接处理是否是 Django 为您做的事情,或者您是否仍然需要在代码中管理它们,但这也许是解决这个问题的一种方法。Sounds like a closing problem to me.
I think the
with
keyword is supposed to help with closing resources in Python. I don't know if connection handling is something that Django does for you or if you still have to manage them in your code, but perhaps that would be one way to address it.