F
Fritz
Environment: Windows Server 2003 EE, .Net Framework 1.1, C#
I have a problem of memory usage growing continuously.
Basically, my application is a windows service that polls a webservice
method. This method returns a string array which is normally empty, and no
action is performed. Every 30 secs (polling time) the memory usage raises of
few KB.
Do you have any idea about what can cause this working set increment?
I report here the code of the timer event handler for who feels like having
a look.
// Timer.Elapsed event handler
public static void OnTimedEvent(object source, ElapsedEventArgs e)
{
timer.Enabled=false;
IniData ini=IniData.Instance(); // initialization class (singleton)
Logger log=Logger.Instance(); // log class (singleton)
try
{
WebService jgpm=new WebService(); // The web service is secured by using
https and certificates
X509Certificate x509 =
X509Certificate.CreateFromCertFile(ini.getCerFileName());
jgpm.ClientCertificates.Add(x509);
jgpm.Url=ini.getWsUrlRoot()";
string s=x509.GetName();
string[] tickets=jgpm.getOrders(s); // WEB SERVICE METHOD
foreach (string ticket in tickets) // tickets is normally empty and the
statement is not executed
{
// ticket elaboration
}
}
catch (Exception exc)
{
log.Debug(exc.Message);
}
timer.Enabled=true;
}
I have a problem of memory usage growing continuously.
Basically, my application is a windows service that polls a webservice
method. This method returns a string array which is normally empty, and no
action is performed. Every 30 secs (polling time) the memory usage raises of
few KB.
Do you have any idea about what can cause this working set increment?
I report here the code of the timer event handler for who feels like having
a look.
// Timer.Elapsed event handler
public static void OnTimedEvent(object source, ElapsedEventArgs e)
{
timer.Enabled=false;
IniData ini=IniData.Instance(); // initialization class (singleton)
Logger log=Logger.Instance(); // log class (singleton)
try
{
WebService jgpm=new WebService(); // The web service is secured by using
https and certificates
X509Certificate x509 =
X509Certificate.CreateFromCertFile(ini.getCerFileName());
jgpm.ClientCertificates.Add(x509);
jgpm.Url=ini.getWsUrlRoot()";
string s=x509.GetName();
string[] tickets=jgpm.getOrders(s); // WEB SERVICE METHOD
foreach (string ticket in tickets) // tickets is normally empty and the
statement is not executed
{
// ticket elaboration
}
}
catch (Exception exc)
{
log.Debug(exc.Message);
}
timer.Enabled=true;
}