Sielnix / EFCore.Snowflake

Entity Framework Core provider for Snowflake
GNU Lesser General Public License v3.0
31 stars 2 forks source link

: 'Error: Session no longer exists. New login required to access the service. SqlState: , VendorCode: xxx, QueryId: ' #10

Closed hemant-navarkar closed 5 months ago

hemant-navarkar commented 5 months ago

We are using the latest version of the EFCore.Snowflake for connecting to the DB we are creating small .Net8 Web APIs. We are having single repository which instantiate the XXDBContext for every request.

When the app is run and API executed parallel we are getting the above exception. This issue was reported in existinng .Net driver previously which was solved in current version of Snowflake.Data.

Please check below thread.

Is there any way for not ti use the connection pool ? I guess the issue might be from connection pool but not sure.

Environment: Applicatoin: .Net8 Backend App ORM Nuget: EFCore.Snowflake (8.0.4.1) .Net Driver Used Internally by ORM: Snowflake.Data.dll (3.1.0.0) OS: Windows 10 (64 bit)

Sielnix commented 5 months ago

Hello @hemant-navarkar, Thank you for your submission. As you mentioned, bug itself is probably related to Snowflake.Data. You can disable pooling in Snowflake.Data by calling static method SnowflakeDbConnectionPool.SetPooling(false);. Please, let me know if it resolves your isue.

Sielnix commented 5 months ago

Mentioned fix for Snowflake.Data should have resolved the problem. If it would still appear then feel free to reopen this issue.