This is a migrated thread and some comments may be shown as answers.

Memory leak problem/ increasing in IE for on refresh

5 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 23 Jan 2012, 06:51 PM
Hi all
I'm using radgrid in my website.
Im loading radgrid for radpanelbar in foue radpanel items which means one radgrid for one tab.
I'm refreshing the this page for every 15 secs ,every time on refresh.
So when I see the memoryusage of IE in taskmanager its keep on increasing for every 15 or 13 secs like that.
But I'm not loading any extra data on refresh.
Pls help me in this since this is considered as critical from my client.
and I have same issue in two pages.
Help me asap pls.

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2012, 05:45 AM
Hello Ram,

Take a look at the following help documentation.
IE Memory Leaks.

-Shinu.
0
Ram
Top achievements
Rank 1
answered on 27 Jan 2012, 03:10 PM
Hi Shinu ,
Thanks for the reply.
I have created the one sample application with refresh interval of 5 secs.
Still I'm seeing the memory increase in Taskmanager for IE8.
If I replaced the telerik radgrid by Asp gridview ,I did't see the memory increase.

I dont know whats went wrong.
I have this similar kind of problem in 3 pages on refresh of radgrid for some interval.
In my actual applicaiton.I'm loading the page in IFrame

Here I'm posting my sample app code. pls verify it and correct me where I'm doing wrong.
Here is my aspx code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      
    </div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>   
     <asp:Timer ID="refreshTimer" runat="server" ontick="refreshTimer_Tick" >
    </asp:Timer>
    <asp:UpdatePanel ID="updatepnl" UpdateMode="Conditional" runat="server">
 <Triggers>
   <asp:AsyncPostBackTrigger ControlID="refreshTimer" EventName="Tick" />
   </Triggers>
<ContentTemplate>  
<telerik:RadPanelBar ID="RadPanel1" Skin="WebBlue" runat="server" Width="160px">
 <Items>
    <telerik:RadPanelItem Text="First">
    <ContentTemplate>
   <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" 
        AllowPaging="true" PageSize="10" onneeddatasource="Radgrid1_NeedDataSource">
   </telerik:RadGrid>
    </ContentTemplate>
    </telerik:RadPanelItem>
    <telerik:RadPanelItem Text="Sec">
    <ContentTemplate>
   <telerik:RadGrid ID="RadGrid2" runat="server"  onneeddatasource="Radgrid2_NeedDataSource" AutoGenerateColumns="true" AllowPaging="true" PageSize="10">
   </telerik:RadGrid>
    </ContentTemplate>
    </telerik:RadPanelItem>
    <telerik:RadPanelItem Text="Third">
    <ContentTemplate>
   <telerik:RadGrid ID="RadGrid3" runat="server"  onneeddatasource="Radgrid3_NeedDataSource" AutoGenerateColumns="true" AllowPaging="true" PageSize="10">
   </telerik:RadGrid>
    </ContentTemplate>
    </telerik:RadPanelItem>
    <telerik:RadPanelItem Text="Forth">
    <ContentTemplate>
   <telerik:RadGrid ID="RadGrid4" runat="server"  onneeddatasource="Radgrid4_NeedDataSource" AutoGenerateColumns="true" AllowPaging="true" PageSize="10">
   </telerik:RadGrid>
    </ContentTemplate>
    </telerik:RadPanelItem>
    </Items>    
</telerik:RadPanelBar>
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>

Here is my codebehind:

using System;
  
using System.Collections.Generic;
  
using System.Linq;
  
using System.Web;
  
using System.Web.UI;
  
using System.Web.UI.WebControls;
  
using System.Data;
  
using System.Data.SqlServerCe;
  
using System.Text;
  
public partial class _Default : System.Web.UI.Page
  
{
  
protected void Page_Load(object sender, EventArgs e)
  
{
  
if (!Page.IsPostBack)
  
{
  
AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);
  
refreshTimer.Interval = 5 * 1000; 
  
  
}
  
public DataTable GetData(string query)
  
  
DataTable dt;
  
StringBuilder strFolderPath = new StringBuilder("Data Source=" + Server.MapPath(".") + "\\TEST.sdf");
  
string SqlCeConnectionString = strFolderPath.ToString();
  
using (SqlCeConnection con = new SqlCeConnection(SqlCeConnectionString))
  
{
  
  
using (SqlCeCommand cmd = new SqlCeCommand(query, con))
  
{
  
dt=new DataTable();
  
con.Open();
  
SqlCeDataReader dr = cmd.ExecuteReader();
  
dt.Load(dr); 
  
con.Close();
  
}
  
}
  
return dt;
  
}
  
protected void Radgrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
  
{
  
RadGrid1.DataSource = GetData("select name from NAMES");
  
}
  
protected void Radgrid2_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
  
{
  
RadGrid2.DataSource = GetData("select name from NAMES");
  
}
  
protected void Radgrid3_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
  
{
  
RadGrid3.DataSource = GetData("select name from NAMES");
  
}
  
protected void Radgrid4_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
  
{
  
RadGrid4.DataSource = GetData("select name from NAMES");
  
}
  
protected void refreshTimer_Tick(object sender, EventArgs e)
  
{
  
RadGrid1.Rebind();
  
RadGrid2.Rebind();
  
RadGrid3.Rebind();
  
RadGrid4.Rebind();
  
}
  
}
 I searched on google for help,many of the telerik forums suggesting update the version.
But the version I'm using latest only i think
version of telerik:2011.1.519.40

I tried to attach the database sdf file by renameing to test.png,but its not uploading.
please feel free to help me asap, its very crusial issue.
Actually my access for creating seperate ticket has expired ,so I'm posting my problem here.
0
Veli
Telerik team
answered on 01 Feb 2012, 09:27 AM
Hello Ram,

The Timer control itself is leaking when it is wired up with AJAX to make asynchronous page updates. The memory leak can be avoided by making full page postbacks at certain intervals to have IE clear up leaked memory. If this is not an option for you, consider opening a regular support ticket where you can send us a sample runnable project demonstrating your scenario. This will help us find a workaround for this issue.

Veli
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
SC
Top achievements
Rank 1
answered on 05 Nov 2014, 03:52 PM
Hello Shinu

We have (asp.net 4.0+c#+telerik+ajaxtoolkit) web application , none of the users except one  get out of memory errors. Can it be something related to compatibility of the telerik with ajax tool ki and IE 8.0(64 bit) etc

Thanks
SC
0
Pavlina
Telerik team
answered on 10 Nov 2014, 02:56 PM
Hi,

Based on your description it is hard to determine the cause of the problem. The most common reason for a memory leak is server-side code that works with Session and Application storage. However, without replicating the issue on our end we could not further investigate the reason for getting memory errors. Generally, we are using tools like sIEve for tracking down memory leaks in our controls and if we find any, we are doing our best to fix them as soon as possible.

Therefore, I would suggest to upgrade to the latest version recent version of the controls (if you haven't already) and to test your real application with sIEve or a similar tool. If they indicate memory leaks caused by our products, please send us a sample project along with detailed reproduction steps and we will check it right away.


 Thank you for your cooperation in advance.

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Ram
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ram
Top achievements
Rank 1
Veli
Telerik team
SC
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or