Ошибка при подключении базы данных Microsoft SQL server - PullRequest
0 голосов
/ 09 ноября 2019

У меня есть серверный проект онлайн-игры, и я очень часто получаю фатальную ошибку базы данных. Это происходит, когда программе приходится загружать данные из базы данных, но не всегда. Я думаю, совершенно убежден, что ошибка связана с нехваткой оперативной памяти. Я могу увеличить общую оперативную память машины, но использует ли база данных память, которая ей нужна динамически, или она может быть чем-то ограничена? Я не так много знаю об этом, поэтому буду очень признателен за вашу помощь. Спасибо! Я оставляю ошибку ниже в качестве ссылки.


System.Data.Entity.Core.EntityException: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Data.Entity.Core.EntityException: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. ---> System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) ---> System.ComponentModel.Win32Exception: No process is on the other end of the pipe
   --- End of inner exception stack trace ---
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
   --- End of inner exception stack trace ---

...

at Def.DAL.DAO.SInstanceDAO.LoadByStoneId(Int16 stoneId) in C:\Users\Administrator\Desktop\Definitiva\Def.DAL.DAO\SInstanceDAO.cs:line 98
   at Def.GameObject.SpecialItem.Use(ClientSession session, ItemInstance& inv, Byte Option, String[] packetSplit) in C:\Users\Administrator\Desktop\Definitiva\Def.GameObject\Item\SpecialItem.cs:line 1371
   at Def.Handler.BasicPacketHandler.Guri(GuriPacket guriPacket) in C:\Users\Administrator\Desktop\Definitiva\Def.Handler\BasicPacketHandler.cs:line 1084
   at Def.GameObject.ClientSession.TriggerHandler(String packetHeader, String packet, Boolean force, Boolean ignoreAuthority) in C:\Users\Administrator\Desktop\Definitiva\Def.GameObject\Networking\ClientSession.cs:line 604
   at OpenNos.GameObject.ClientSession.HandlePackets() in C:\Users\Administrator\Desktop\Definitiva\Def.GameObject\Networking\ClientSession.cs:line 490
   at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)

... 

(Incomplete Trace)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...