英文:
Snowflake session no longer exists. new login required to access the service for .NET connector
问题
我们正在使用Snowflake .NET连接器(Snowflake.Data
2.0.15)将数据从Snowflake导入到我的ASP.NET MVC 4.7.2应用程序中,并遇到以下问题。
只有当应用程序在4小时内没有与Snowflake的通信时才会出现此问题。
> 会话不再存在。需要新的登录才能访问服务。 SqlState:,VendorCode: 390111
我了解到这可以通过设置CLIENT_SESSION_KEEP_ALIVE=True
来修复,但我猜这在.NET中不受支持?是否有任何解决方法?
英文:
We are pulling data from Snowflake into my ASP.NET MVC 4.7.2 application using Snowflake .NET connector (Snowflake.Data
2.0.15) and running into an issue as outlined below.
The issue occurs only when there is no call from app to Snowflake for more than 4 hours.
> Session no longer exists. New login required to access the service. SqlState: , VendorCode: 390111
I understand this can be fixed by setting CLIENT_SESSION_KEEP_ALIVE=True
which I guess is not supported by .NET ? Is there any workaround?
答案1
得分: 2
参数 CLIENT_SESSION_KEEP_ALIVE
支持 .NET 驱动程序,并自版本 2.0.18 添加。请参见 此处 获取版本 2.0.18 的信息。
然而,关于 参数 的文档似乎未被更新,这可能会引起混淆。
我建议至少使用版本 2.0.23,因为它修复了该参数的一些问题:
2.0.23
修复了一个问题,当 client_session_keep_alive=true 时,.NET 应用程序会因未处理的异常而终止。
2.0.22
修复了一个问题,导致设置 CLIENT_SESSION_KEEP_ALIVE=true 的应用程序在关闭连接时挂起。
英文:
The parameter CLIENT_SESSION_KEEP_ALIVE
is supported for .NET driver and has been added since version 2.0.18. See also here for version 2.0.18.
The documentation for parameters though seems not being updated and that may cause the confusion.
I would suggest to use at least version 2.0.23 since it has some issues fixed for this parameter:
2.0.23
Fixed an issue where a .NET application would terminate for an unhandled exception when client_session_keep_alive=true.
2.0.22
Fixed an issue that caused applications that set CLIENT_SESSION_KEEP_ALIVE=true to hang when it closed the connection.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论