QuoteReplyTopic: Random exception. What should I look for? Posted: 12-Apr-2012 at 2:10pm

Under load I'm getting some exceptions that look like so:

Object reference not set to an instance of an object.Anonymously Hosted DynamicMethods Assembly at lambda_method(Closure ) at IdeaBlade.Linq.LocalizingExpressionVisitor.ConstantizeExpression(Expression expression, Type type) at IdeaBlade.Linq.LocalizingExpressionVisitor.MakeLocal(Expression e) at IdeaBlade.Linq.LocalizingExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressions(IEnumerable`1 expressions) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressions(IEnumerable`1 expressions) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressions(IEnumerable`1 expressions) at IdeaBlade.Linq.ExpressionVisitor.VisitExpressionCore(Expression e) at IdeaBlade.Linq.TransformExpressionVisitor.VisitExpressionCore(Expression expr) at IdeaBlade.Linq.ExpressionVisitor.VisitExpression(Expression expr) at IdeaBlade.Linq.LocalizingExpressionVisitor.Visit(Expression expr) at IdeaBlade.EntityModel.ServerEntityQuery..ctor(EntityQuery query) at IdeaBlade.EntityModel.EntityQuery`1.GetServerQuery() at IdeaBlade.EntityModel.EntityQueryFinder.get_ServerQuery() at IdeaBlade.EntityModel.EntityQueryFinder.Execute() at IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync) at IdeaBlade.EntityModel.EntityManager.ExecuteQuery[T](IEntityQuery`1 query) at IdeaBlade.EntityModel.EntityQuery`1.GetEnumerator() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at IDATT.Web.Services.MobileService.GetTripData(DateTime lastSyncOn) in C:\CodeWorkspace\idatt\Code\ServerSide\IDATT.Web.Services\Rest\MobileService.cs:line 457 at IDATT.Web.Services.MobileService.GetUserTrips(String userName) in C:\CodeWorkspace\idatt\Code\ServerSide\IDATT.Web.Services\Rest\MobileService.cs:line 231

I have this exception about 10 times in my log in 10 hours and 20000 calls. What should I look for?

Also, same query produces another exception and I see this one once in a while however logging inner and actual exception doesn't make much difference as far as helping me understand what's actually wrong with it..

An error occurred while reading from the store provider's data reader. See the inner exception for details. at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError) at IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate entityQuery) at IdeaBlade.EntityModel.EntityManager.ExecuteFetch(IEntityFinder finder) at IdeaBlade.EntityModel.EntityQueryFinder.Execute() at IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync) at IdeaBlade.EntityModel.EntityManager.ExecuteQuery[T](IEntityQuery`1 query) at IdeaBlade.EntityModel.EntityQuery`1.GetEnumerator() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at IDATT.Web.Services.MobileService.GetTripData(DateTime lastSyncOn) in C:\CodeWorkspace\idatt\Code\ServerSide\IDATT.Web.Services\Rest\MobileService.cs:line 457 at IDATT.Web.Services.MobileService.GetUserTrips(String userName) in C:\CodeWorkspace\idatt\Code\ServerSide\IDATT.Web.Services\Rest\MobileService.cs:line 231

I can't see anything obvious from the stack trace and message. My first suggestion is to see if the debug log provides some clues there for the second error. The log might not be useful for the first error since it's a CacheOnly query.

For the first error, my suggestion is to see if you can narrow it down to certain data values. Probably put some kind of logging and trace messages that log what data are being passed to the .Where clause.

A cache-only query is a query executed against the EntityManager's cache with a QueryStrategy.CacheOnly. It doesn't hit the database. I thought this was the case since you said that the query is being executed locally. But apparently, you meant locally as in on the web server and still hitting the database :)

Since this is the case then the debug log should have some info as well.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot delete your posts in this forumYou cannot edit your posts in this forumYou cannot create polls in this forumYou cannot vote in polls in this forum