R 实例失败 +远程数据库连接
简单问题:我使用 RODBC 连接以批处理模式并行运行多个 R 实例,并且随机一个(或多个)实例出现故障。如果我回去一一运行实例,所有实例都会成功。日志中没有错误,我只是想推断问题到底出在哪里。我的主要假设是,我遇到了内存堆顶部并且实例失败,或者(更有可能)RODCB 连接发生某种超时。有什么建议吗?
谢谢,
吉姆
Quick question: I am running multiple R instances parallel in batch mode using an RODBC connection, and randomly one (or more) of my instances is failing. If I go back and run the instances one by one, all of them are successful. There is no error in the log, and I am just trying to deduce where exactly the issue is coming from. My main hypotheses are that I am hitting a memory heap top and the instance is failing, or (more probably) there is some kind of time out happening with the RODCB connection. Any suggestions?
Thanks,
Jim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前尚不清楚为什么没有错误显示,也许您可以尝试
options(error = recovery)
我曾经在使用多个数据库连接时收到以下错误:
我通过发出以下行来关闭来避免此错误在发出新查询之前是否有任何打开的连接:
我从 获取此代码帮助列表。
更新:我的一位合作者创建了函数套件 促进数据库交互,包括
db.con
、db.open
、db.close
和db.query
> 可以这样使用:It is not clear why no error shows, perhaps you could try
options(error = recover)
I used to get the following error when using multiple database connections:
I avoid this error by issuing the following line to close any open connections before issuing a new query:
I took this code from the R help list.
update: one of my collaborators has created a suite of functions to facilitate database interactions, including
db.con
,db.open
,db.close
, anddb.query
that could be used like: