Я почитал уже по поводу проблем с w3wp.exe. На сколько я понял проблема чаще всего в коде,а не в процессе. Пробовал уже память ограничивать..,с перезапуском процесса не вариант. Не нормально перезапускать процесс на пол дела.
Я прошу помочь разобраться в коде..может подскажете где может быть утечка ппамяти.. Создаю репорты .rdlc.
Есть такой метод
Код
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
private void MainReportBulder(DataSet dataSet)
{
if (dataSet != null && SessionProfile != null)
{
this.reportViewerMain.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
this.reportViewerMain.ShowExportControls = true;
Microsoft.Reporting.WebForms.LocalReport localReport = this.reportViewerMain.LocalReport;
localReport.ReportPath = "Reports/MainReport.rdlc";
Microsoft.Reporting.WebForms.ReportDataSource reportDS = new Microsoft.Reporting.WebForms.ReportDataSource();
reportDS.Name = "MainReportDS";
reportDS.Value = dataSet.Tables["CountOnDay"];
localReport.DisplayName = "Shop Report";
localReport.DataSources.Clear();
localReport.DataSources.Add(reportDS);
}
}
|
Ему передается датасет из метода
Код
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
public static DataSet GetMainReportData(DateTime date, Guid shopId/*, Cache cache*/)
{
DataSet dataset = new DataSet("MainDataSet");
try
{
string str = date.ToShortDateString();
string str2 = str.Replace(".","");
string key = "sp_GetSrezData_"+str2 + "_" + shopId;
//if (cache[key] == null)
//{
string sSelect = "exec StockDB.dbo.sp_GetSrezData @STARTDT, @SHOPID";
SqlCommand command =
new SqlCommand(sSelect, connection);
command.Parameters.Add("@STARTDT", SqlDbType.DateTime);
command.Parameters["@STARTDT"].Value = date;
command.Parameters.Add("@SHOPID", SqlDbType.UniqueIdentifier);
command.Parameters["@SHOPID"].Value = shopId;
SqlDataAdapter salesOrderAdapter = new
SqlDataAdapter(command);
salesOrderAdapter.Fill(dataset, "CountOnDay");
//cache.Add(key, dataset, null, DateTime.Now.AddMinutes(30), Cache.NoSlidingExpiration, CacheItemPriority.High, null);
//}
//else
//{
// dataset = (DataSet)cache[key];
//}
}
catch
{
}
return dataset;
}
|
Кэши все уже поотключал,но это не помогает(( Куда может память уходить?
В режиме отладки заполнение dataset много памяти не сьедает..а вот последующее отображение забирает много памяти и судя по всему потом не возвращает.