User-1846695518 posted
Hello,
I have a asp.net web api which devlivers very small amount of data but heavily used .
My method is
public HttpResponseMessage GetFingerprint(string id, string fingerprintVersion, string snapshotVersion, string thesaurus)
{
HttpResponseMessage badAccessResponse = CheckAccess(_serviceHelper, ExportCommon.Models.Request.Type.FingerprintDocument, null);
if (badAccessResponse != null) return badAccessResponse;
HttpResponseMessage response = Request.CreateResponse();
FingerprintRequest fingerprintRequest = new FingerprintRequest();
fingerprintRequest.id = id;
fingerprintRequest.Resource = "Document";
fingerprintRequest.FingerprintVersion = fingerprintVersion;
fingerprintRequest.SnapshotVersion = snapshotVersion;
fingerprintRequest.Thesaurus = thesaurus;
var fingerprintStream = new FingerprintStream(fingerprintRequest);
var mediaTypeHeaderValue = new MediaTypeHeaderValue("text/xml");
mediaTypeHeaderValue.CharSet = "utf-8";
response.Content = new StringContent(fingerprintStream.GetFingerprintsByDocId(), Encoding.UTF8, "text/xml");
//response.Content = new PushStreamContent(fingerprintStream.WriteToStream, mediaTypeHeaderValue);
return response;
}
But the memory is constantly increasing . So in application poll , I have a setting to limit and recyle at 7GB. Some time this is causing 500 Internal Server error on client side.
Can some one let me know what could the possibel reasons that memory is getting increased.
How can we clean memory?.
Regards,
Ayyappa K