memory and thread leaks - WeOnlyDo Discussion board

memory and thread leaks (General questions)

by Paul Draper, Thursday, October 13, 2005, 10:47 (6981 days ago)

Hi,

I apologise in advance for this being very vague, but I have just started investigating the problem.

We have an application which has a wodServer and wodClient pair that act like an intelligent proxy. The wodServer receives requests from the browser and pass them to the wodClient which passes them on to the real web Server. The responses back are similarly passed.

Everything seems to be working OK, except when we turn on secure mode (https). When we do this the memory size of the running exe rises rapidly, as do the number of threads being used.

I am investigating the problem, and was wondering if you have come across any memory/thread leak issues when using secure mode on the Http Com objects?

Thanks
Paul.

Re: memory and thread leaks

by wodSupport, Thursday, October 13, 2005, 13:37 (6980 days ago) @ Paul Draper

Paul,

not that I'm aware of. Can you send me that software overhere so I can run it and see if it leaks?

Kreso

Re: memory and thread leaks

by Paul Draper, Thursday, October 13, 2005, 13:40 (6980 days ago) @ wodSupport

Hi,

I'll do some more investigation first to try to identify the problem.

I only asked the question in case it was something you had seen before.

I'll be in touch when I know more.

Thanks
Paul.

Re: memory and thread leaks

by wodSupport, Thursday, October 13, 2005, 13:42 (6980 days ago) @ Paul Draper

Paul,

make sure you request update and use newest version. We did made one small fix regarding multiple instances and SSL, perhaps it's related.

Re: memory and thread leaks

by Paul Draper, Wednesday, October 26, 2005, 17:19 (6967 days ago) @ wodSupport

Hi,

I've done a bit more investigation.

The fact that I was running https wasn't relevant, I get the problem when its normal http aswell.

I also didn't mention that I am running under C++ builder 6

I am setting the Server->Threads property to FullThreads which according to the documentation means that each user that makes a request runs in its own thread.

If I set the property to NoThreads then I do not get the thread leak problems I am seeing, however I need to run using FullThreads.

This indicates to me that the thread being allocated to the User is not being tidied up. I can see the UserDisconnected event firing in the the Server. Should the User object and the thread be being destroyed when this event completes?

When should the thread be destroyed. Is there anything I can do in my code to make it free up the threads.

I have a small(ish) C++ builder App that I have zipped up and will send to you.

Thanks
Paul.