Error accesing Geography data: OutOfMemoryException Microsoft.SqlServer.Types.SridList

77 Views Asked by At

I'm getting a weird error on my site, up until this point everything was ok, now I get this error everytime I access a page that queries data that contains geography data (from what I can tell) . I can query all the data in Microsoft SQL Studio though... I have a second website wit the exact same on code on same server but with different databases, and that one works ok. The SQL server database of the one that does not work has available space of 6MB, and the other that does work has 60MB available. The autogrowth is set to 64MB

Any idea on what I can fix this? Below is the stack trace:

[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.] Microsoft.SqlServer.Types.SridList..cctor() +0

[TypeInitializationException: The type initializer for 'Microsoft.SqlServer.Types.SridList' threw an exception.]
Microsoft.SqlServer.Types.SqlGeography.set_Srid(Int32 value) +26
Microsoft.SqlServer.Types.SqlGeography..ctor(GeoData g, Int32 srid) +52 lambda_method(Closure , BinaryReader ) +140 System.Data.Entity.SqlServer.SqlSpatialDataReader.GetGeography(Int32 ordinal) +216
System.Data.Entity.Core.Common.Internal.Materialization.ErrorHandlingValueReader1.GetValue(DbDataReader reader, Int32 ordinal) +232 System.Data.Entity.Core.Common.Internal.Materialization.Shaper.GetSpatialPropertyValueWithErrorHandling(Int32 ordinal, String propertyName, String typeName, PrimitiveTypeKind spatialTypeKind) +328 lambda_method(Closure , Shaper ) +7306 System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly(Func2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet) +258 lambda_method(Closure , Shaper ) +518 System.Data.Entity.Core.Common.Internal.Materialization.Coordinator1.ReadNextElement(Shaper shaper) +384 System.Data.Entity.Core.Common.Internal.Materialization.RowNestedResultEnumerator.MaterializeRow() +137 System.Data.Entity.Core.Common.Internal.Materialization.<MoveNextAsync>d__7.MoveNext() +355 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Data.Entity.Core.Common.Internal.Materialization.<TryReadToNextElementAsync>d__12.MoveNext() +360 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.Core.Common.Internal.Materialization.<MoveNextAsync>d__a.MoveNext() +369 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.Internal.<FirstMoveNextAsync>d__0.MoveNext() +614 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 System.Data.Entity.Infrastructure.<ForEachAsync>d__51.MoveNext() +379 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Repository.Pattern.Ef6.d__f.MoveNext() +327 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 Repository.Pattern.Ef6.d__0.MoveNext() +320 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
BeYourMarket.Web.Controllers.d__af.MoveNext() +2254 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62 BeYourMarket.Web.Controllers.d__9c.MoveNext() +203 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +92
System.Web.Mvc.Async.<>c__DisplayClass37.b__36(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +69
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +72 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +396 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +69
System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c() +38 System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +188
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +59
System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +32
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +73 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +73 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +39 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +59
System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +46
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59 System.Web.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar) +231 System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +172

0

There are 0 best solutions below