Forms Data Controls :: Memory Leak - Gridview

Jan 13, 2011

I am using DevExpress Gridview basically, and hit out of memory exception whenever I keep refresh page that contains huge data. I reported to DevExpress team and they claimed it is ASP.NET gridview issue.

Therefore, I create a simple project, a girdview to sqlDataSource. Run the page and press F5 to refresh. I use ANTS profiler to check if any object instance is keep increasing but never been disposed. I found that, memory does happen in this simple project, as what DevExpress team claimed.[Code]....

View 4 Replies


Similar Messages:

Web Forms :: Memory Leak When I Bind GridView To My Dataset?

Oct 29, 2010

I am facing problem memory leak when I bind GridView to my dataset. The dataset will be retrieve when page first loaded (Not postback) and store into session. ANy postback will reuse the dataset from session.

The problem now is, whenever any postback, the memory leak is keep increasing and till 1GB. I read some articles and mentioned it is ASP.NET databind issue. Is it true? Any workaround?

View 9 Replies

DataSource Controls :: Memory Leak - Server Will Crash - Log A Ton Of SQL Errors Stating That It Is "out Of Memory"

Jul 27, 2010

I have a memory leak somewhere that I cant find. Every few days my server will crash, and just before that I log a ton of SQL errors stating that it is "out of memory".

I cant find it anywhere, all of my connections are being disposed like so:

[Code]....
Then I call the connection from my pages like so:[Code]....

That is all pretty straight forward. The connection is disposed because it is implementing the USING clause. I am opening the connection in my connection manager class, and not where it is being utilized?Or, could the problem be in the below method I am using to populate a SqlDataReader:[Code]....

Now, at first it appears as though this could be the problem because the Connection isn't part of a USING clause, however doesn't the 'Data.CommandBehavior.CloseConnection' pretty much do the same thing. This makes sure that the connection is closed when the reader is closed, right? Here is how I call that above reader from my login page code behind:[Code]....

So the DataReader will get closed even without the .Close() because it is in the USING, and the connection should get closed because I specified it in the ExecuteReader paramters right?

View 8 Replies

DataSource Controls :: Possible Memory Leak In DataTable.Select Method?

Jun 18, 2010

I have an application which was recently ported from Classic ASP to .NET 3.5. I'm pulling some data from a stored procedure and once retrieved, I'm doing using the Select method on the DataTable in a loop so I don't have to keep going back to the database.It appears that there's something wrong here as I can refresh the page repeatedly and see the memory usage increase by a few megabytes, up to the point where we get an error. If we recycle the app pool in IIS, it starts working again, for a little while.

Is there a memory leak in this method? I did some research on the subject and Microsoft said there was an issue like that in .NET 1.0 and 1.1, but I'm using a higher version.Or, is this something else, such as not managing resources correctly? Here's a snipped of my code:

[Code]....

Initially, this app was using XML instead of a datatable and using XPATH to query the data, but it was too slow. I thought using a dataset with DataTable selects was a better option, but now we found this issue. I was thinking since the loop executes several hundred times that getting all the data and filtering through it on the client was a better choice instead of calling several web methods to get the subsets of data.

View 5 Replies

C# - Impersonation Memory Leak

Feb 9, 2011

On http://msdn.microsoft.com/en-us/library/w070t6ka(v=VS.100).aspx there is an example on how to do impersonation with .net 4.0. We have used this example in a class that inherits IDisposable for ease of use. However, when we use this class in a asp.net web application, we notice a slight but steady increase of Pool Paged Bytes in performance monitor. After a week, the application crashes.

I've tried different implementations of the impersonation-class, using http://msdn.microsoft.com/en-us/library/w070t6ka(v=VS.90).aspx and http://support.microsoft.com/kb/306158 as reference, but they all show the same leak.

Where does this leak come from? Is there a problem with the windows api? We are running Windows 2008 R2.

This is our current version of the impersonation class:

public class Impersonator : IDisposable
{
public Impersonator(string username, string domain, string password)
{
if (!ImpersonateValidUser(username, domain, password))[code]....

And this is the performance monitor graph of two webservers using different versions of the class:

When we disable the class, and use global impersonation via web.config, those lines are completely flat.

Update,I have made a test-application that successfully reproduce the problem. It can be downloaded here:

http://rapidshare.com/files/447325211/ImpersonationTest.zip

The result over 18 hours looks like this:

View 1 Replies

C# - Mscorwks.dll Memory Leak

Aug 2, 2010

We got a problem in one of our ASP.net apps, the mscorwks.dll is using a lot of memory. where to start looking for the memory leak ?

mscorwks!EEVirtualAlloc+119: 1.26 GBytes worth of outstanding allocations.

View 3 Replies

MVC :: Memory Leak In Database Factory

Jun 14, 2010

I'm writing an MVC app and want to have a central DataBase factory class to provide all my DB connections, something like this:-

[Code]....obviously I'll have to instanciate this every time I need to use it, so I was thinking of making it a static class:-

[Code].... so that instead of my controller code saying

[Code].... I can just say

but would this cause a memory leak? I'm sure I remember reading somewhere that if a static class creates objects that persist beyond it's methods and return those (esp things like DB connection objects) these won't get garbaged collected when the calling method is disposed of as they were created/referenced outside the scope of that calling (controller action) method and so will hang around in memory?

var tableObject = DatabaseFactory.GetDatabaseTable();
List<DbRecord> records = tableObject.Table.ToList();

View 9 Replies

AJAX :: UpdatePanel Memory Leak IE8?

Nov 2, 2010

I created a site which fills an UpdatePanel with dynamically created buttons when clicking on an other button. Now every time I click the button the used memory increases. I already tried the workaround from http://www.crockford.com/javascript/memory/leak.html to remove old eventhandlers before updating the UpdatePanel. But the used memory still increase. Is there a problem with my code or is there an other workaround?

Here is the code of a sample aspx site which shows the problem: [Code]....

Browser IE8

OS WinXP SP2

.Net Framework 3.5 SP1

View 3 Replies

C# - WebRequest/WebResponse Memory Leak?

Dec 7, 2010

I have an .Net Framework #4.0 application that makes a large number of web requests using the WebRequest/WebResponse classes , as i see it has memory leak (or maybe i am doing something wrong)I Wrote some small simple application that demonstrates this:

class Program
{
public static void Main(string[] args)[code]...

The only one solution i came up with is use GC.Collect() (unmarked in example) , All the object are disposed , all streams are closed , am I missing something ?I found something but i don't understand the reason , if i minimize Console the memory usage decreases and looks O.K , what can be the reason for that is there a problem with Conosole or WinForm .

View 1 Replies

.net - Possible Memory Leak In Asynchronous .NET Call To A WebService?

Sep 16, 2010

I've created a small class library to asynchronously call a WebService(Fire and Forget. I don't need the result).In a Windows Form application, the XXXAsync() method works fine. But, in a Web Application, the process is locked until the XXXCompleted event is fire.My problem is: I tried to create a Delegate and use the Begin/EndInvoke to call the XXXAsync() method. It worked fine, but, the w3wp process seems to be consuming a huge amount of memory. I'm calling the EndInvoke method properly. Invoking the GC.Collect did not free any memory

View 1 Replies

Facebook - How To Find Memory Leak From ASPX App Having A DLL

Apr 30, 2010

Any tips How to figure out where is memory leak in my Facebook app, its ASPX using Facebook toolkit DLL and I am afraid the bug may be in that CS library.

The problem is that after one week uptime, server is running out of memory and needs to be rebooted, there are quite many users and I cannot run debugger on this "production server", so I would need to simulate somehow use on my local PC.

View 1 Replies

AJAX :: ToolkitScriptManager Memory Leak - Using IE7 And Have Removed All Inline JS And JS Files

Jan 17, 2011

I'm using the ToolkitScriptManager on a page so that I can use the update panel. Everytime I refresh the page the mem usage in task manager jumps up 3-4megs. I'm using IE7 and have removed all inline JS and JS files to no avail.

View 4 Replies

Visual Studio :: VS 2010 Memory Leak When Trying To Copy & Paste Code Inside?

Oct 8, 2010

It happens frequently when I try to copy & paste code inside VS 2010 with following message:

insufficient available memory to meet the expected demands of an operation at this time, possibly due to virtual address space fragmentation. Please try later.

and I check the memory usage with taskmanager on my computer. It is fine.

In order fix it, I need to close VS 2010 and restart again.

View 1 Replies

Forms Data Controls :: Creating Data Table In Memory And Binding To Gridview Control?

Jun 24, 2010

I'm a bit of an ASP.NET newbie and I am creating a data table in memory and binding this to a gridview control. The code is as follows:

Dim DstBasket As New DataSet, TblBasket As New DataTable
With TblBasket
.Columns.Add("BskPrdCd", System.Type.GetType("System.String"))
.Columns.Add("BskPrdDesc", System.Type.GetType("System.String"))
.Columns.Add("BskQty", System.Type.GetType("System.Int16"))
.LoadDataRow(Split("12345,Test product 1,1", ","), True)
.LoadDataRow(Split("122,Test product 2,2", ","), True)
.LoadDataRow(Split("123A,Test product 3,5", ","), True)
.LoadDataRow(Split("44,Test product 4,1", ","), True)
End With
DstBasket.Tables.Add(TblBasket)
With LfnGridView("GdvBasket")
.DataSource = DstBasket
.DataBind()
End With

The data displays in the gridview control fine with both edit & delete options but when I attempt to delete, it has no effect. How do I force removal of the relevant row from both gridview and table? Most of the documentation I have unearthed shows how to achieve this when connected to a SQL table which is clearly not the case here.

View 2 Replies

Forms Data Controls :: How To Share Class With Not Enough Memory

Dec 22, 2010

I am getting some memory issues, not entirely sure but does anyone think this could be the issue.On the itemdatabound event the following code runs, and it calls a shared class method Return Image which resizes the original image. Could the coding be the issue for the memory problem. There are about 10 or so items.

If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
 
Dim ImgProfile As Image
[code]...

View 1 Replies

DataSource Controls :: Connection Leak In IDataReader?

May 26, 2010

I heard that using "Using" Block avoids Connection Leaks in IDataReader. Is this correct??? If so how it will do that???

View 2 Replies

Forms Data Controls :: 2.0 - System.out Of Memory Exception Error When Access The Web Application

Apr 16, 2010

I am working on a ASP.NET 2.0 application. I get the following exception sometimes when i access the web application. I believe it is related to the server where the application is hosted? Exception of type 'System.OutOfMemoryException' was thrown. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:

[OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Exception of type 'System.OutOfMemoryException' was thrown.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +227
System.Web.Compilation.BuildManager.CompileGlobalAsax() +52
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337
[HttpException (0x80004005): Exception of type 'System.OutOfMemoryException' was thrown.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729
[HttpException (0x80004005): Exception of type 'System.OutOfMemoryException' was thrown.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

What can be the reason for this error and what to check on the code or the server?

View 8 Replies

Error Occurring When Using Wcf To Run Query - Memory Gates Checking Failed Because Of The Free Memory

May 21, 2010

I am building an asp.net application, using II6 on windows server 2003 (vps hosting).

I am confronted with an error I didn't receive on my development machine (windows 7, iis 7.5, 64 bit).

When my wcf service tries launching my query running against a local sql server this is the error I receive:

Memory gates checking failed because the free memory (43732992 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.

View 1 Replies

Error: Attempted To Read Or Write Protected Memory. This Is Often An Indication That Other Memory Is Corrupt?

Oct 11, 2010

I have both VS 2005 and 2008 installed on my machine. 2005 is fine. For 2008, literally any asp.net project I try to create gets this eror. I try stepping into the code, and the error occurs apparently before anything that I can trap is loaded. There is no information written to the event log. I have tried this with a "Hello World" webpage with nothing else going on. Seems unique to my Windows Server 2003 machine.

View 3 Replies

Attempted To Read Or Write Protected Memory. This Is Often An Indication That Other Memory Is Corrupt

Jul 30, 2010

I am getting a weird error in asp.net while using leadtools imaging api. Here's the stack trace.

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at SetThreadData(_THREADDATA* )
at Leadtools.Codecs.CodecsOptions.Use()
at Leadtools.Codecs.RasterCodecs.DoSave(SaveParams saveParams)
at Leadtools.Codecs.RasterCodecs.Save(RasterImage image, Stream stream, RasterImageFormat format, Int32 bitsPerPixel)........

View 1 Replies

Attempted To Read Or Write Protected Memory. This Is Often An Indication That Other Memory?

Jan 26, 2011

I am maintaining C# .NET code written by somebody else, I get following exception few times,Attempted to read or write protected memory. This is often an indication that other memory is corruptThe code structure where I get the above exception is somethign like this,- it is using ref variables in following sequence,Variable-1 and variable-2 are local variables in App1, - App1: func1() which passes these variables reference to func2(), - App1: func2() passes same variables reference via .net remoting to another application (App2).-App2: does the same passes same received reference to another call 2 times.- The execption is occured while returning from App2.

(App1:func1(ref Var1, ref Var2) --> App1:func2(ref Var1, ref Var2) <---App1 .net remoting to App2--> App2:func3(ref Var1, ref Var2)--> App2:func4(ref Var1, ref Var2)-->variables getting updated and function returned to original caller)

My doubts are ,1. Is passing reference variables in such chain is correct? will it cause such exeption? Does .net support ref variable call directly?

View 1 Replies

ANTS Memory Profiler - Which Memory Should Be Looking At?

Aug 24, 2010

I have a memory issue on my websites and am trying to get to the bottom of it. I have downloaded the 14 day trial of ANTS Memory Profiler and have been playing with it to get a grip of what it's telling me. In the memory options on the timeline, I can see Bytes in All Heaps and Private Bytes etc but I am not sure which ones I should be focusing on to see where the memory spikes and doesn't go back down.I am profiling a ASP.NET website using ASP.NET 2.0.

View 1 Replies

Find Out Where The Performance Leak Is?

Jan 31, 2010

I have an self-build asp.net page, (link), and on my own localhost-server it runs very fast.But when I have uploaded it to my rent server (Win08Server, 3GB Ram, 3GhZ...) it goes very very slow (3-5 second a site-switch).

hot to find out what programm is disturbing or where I have a leak?

(the most of the content is static, only a 2 database querys at the beginning!!!)

View 4 Replies

Web Forms :: How To Store Data In Client Users Machine Memory

Jul 2, 2013

i Have multiple File upload. press Uploaded button it will store on sever temp folder. those details are in List  on our program.

when i have press the submit then only those listed files fetch form server-temp-Folder and replace in server-secified- folder.

i want to make those list class save into client location for not affted by some of other updates.

how cn i store the custome list in client memory

View 1 Replies

Web Forms :: Memory Usage (consumption) Of Individual Controls On A Web Form Shown In A Browser?

Oct 12, 2010

Is there a way to check the memory usage (consumption) of individual controls on a web form shown in a browser. Like Repeater Control, Multiline Text box etc. The reason is I am putting the repeater control in session and checking the status of controls, based on which I am doing further actions.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved