I'm using IQueryEventWatcher to log queries for later review and optimization. Since doing so, we've noticed that memory usage is climbing and not stairstepping -- it behaves like a memory leak. Using dotTrace, we find that Session objects are staying around, and being held on to by our IQueryEventWatcher implementation.

I've tried setting it to DataServiceType.NonShared, but that fails at domain build time.

Can you verify that this is indeed a problem and we not diagnosing it incorrectly? If so, is there anything we can do to release the Session objects being held by the IQueryEventWatcher once they're not being used by the rest of the application?

Thanks.

-- Michael

asked Oct 29 '10 at 17:32

Michael%20Sawczyn's gravatar image

Michael Sawczyn
5111

Hello Michael

Today I've reviewed our code and also tried to reproduce the problem in very straightforward test: by creating a lot of sessions, running queries and observing these queries by very simple IQueryEventWatcher which does nothing.

I didn't notice any increases of memory consumption.

It seems that more detailed description required.

It would be useful to see your IQueryEventWatcher implementation and also to get a glance to Session instances usage.

Could you provide us this info for further investigations?

Do you have any test samples showing this issue?

(Nov 02 '10 at 08:42) Alex Ustinov Alex%20Ustinov's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA