asp.net mvc - LINQ to SQL throws exceptions when stress tested -


I have this web app that is running with ASP.NET MVC 1.0 LINQ 2 SQL

The big problem is that I am not talking, looking at a very strange problem with the LINQ 2 SQL throwing exception (mainly the specified invalid or sequence contains more than one element) Am Regarding real heavy / commercial stress test ... What I am basically opening up Firefox and chrome and catching F5 for ten seconds each (I call this poor man a stress test) - Lo and behold; The web app is throwing these exceptions randomly for the next two or five minutes. If I restart the app from IIS7 (or if under the Visual Studio, restart the WebDiv) then all of them are back to normal, nothing like that. First of all, I was skeptical while handling Datacontext, maybe I want to settle it with Global.Asx in every application, but it does not change anything.

I have a single static public static data object which is used by all requests, I am not settling it or making it again. Is this the right way to do it? Do I want to settle it? When should I really settle it?

There are many things that happen on every request - for example, in each page, the user object (for the current user) is loaded from the database and with the "last sin" attribute. Has been updated. Now other things (for example Tag Cloud) are cached

Any thoughts on why this is happening?

Datacente class is not threadseaf - you must create a new one for each operation. See this article by Rick Strahl ()


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -