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


Similar Messages:

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

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

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

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

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

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

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

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

C# - Find Out How Much Memory Is Currently Consumed By Cache

Nov 8, 2010

I'd like to modify the value of my Sliding Expiration time span based on how much memory is available. If the site's traffic is high at any point in time, more data will be added to the cache than during quieter periods. During those quiet periods I can increase the sliding expiration time span, thus allowing data to be stored longer. But when the site is busy I need to free up memory so I'm happier with a shorter time span.

So I guess my questions are as follows: Is it possible for me to find out how much memory is being consumed by the items I've added to HttpRuntime.Cache? If so, how? Does this sound like a realistic solution to the problem I've described?

View 1 Replies

Variable Declaration - Saved In Viewstate Of ASPX Page / Server Memory?

Jun 21, 2010

Consider this code:
Partial Public Class MyAspNETClass
Inherits System.Web.UI.Page
Protected Shared MyVariable As String

Is Myvariable a variable used local for each instance of the page ? Or that variable is "shared" for all users accessing my page? Is MyVariable saved in server memory, or is it saved on the viewstate of aspx page?

View 1 Replies

WebMatrix :: Can Find The Code Of The Twitter Or Facebook Or WebGrid Helpers?

Aug 26, 2010

Just in general, where can I find the code to take a look at and learn from them? Or at least look at the functions available to me as I do get the feeling that the insufficient documentation at the moment reveals all.

View 5 Replies

Facebook Comments Plugin Not Working On Aspx Page?

Jan 24, 2011

I'm trying to get the facebook comments plugin working on my aspx page..but it is not appearing on the page.

I am using the Facebook.NET api from codeplex for authorization. I inserted the code that was generated from the Facebook Comments plugin page...

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId={MyApp's ID}&amp;xfbml=1"></script>
<div>
<fb:comments numposts="15" width="425" publish_feed="true"></fb:comments>
</div>

I can see that the script is retrieved by inspecting the resulting html code in firebug...but can't figure out why the plugin is not being rendered...

View 1 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

User Controls :: Fetch Likes Of A Page And Find Whether Particular User Liked It Using Facebook Graph API?

Nov 16, 2013

I'm writing applications on Facebook located on an external website ASP.NET C #. The application should check whether or not a person likes my Fan Page (page) on Facebook, and if he or she doesn’t like it needs to like it before using this application. How this can be done using the Graph API and ASPSnippets Facebook API.

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

To Find Out Whether A *.aspx Page Was Changed?

Dec 2, 2010

is there a way in ASP.NET to find out, wheter a *.aspx page was changed.I need it to refresh a cached static variable in a base-page constructor.

View 1 Replies







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