Huge memory leak over time on deployed stand alone

Runtime inside the actual web app.
Say to change it using a button or whatever at actual runtime of the web app.

Right. That you cannot do.

@Greg_O_Lone Thanks for the fix! I’ll test it out now. Could you do a back port to 2019r3? We have lots of web apps running and it’s not feasible to switch them over to 2021r1.1 right now.

3 Likes

Highly request this as well

+10000000000000

1 Like

For the back port of the bug fix, we’d need to know what the actual error is.

If it is a circular reference, we may need to find the object, set the property to nil and break the reference. But that may be difficult if something is marked private and Introspection can’t help.

1 Like

Just out of curiosity, do you use a lot of Dictionaries? I have seen a steady increase in the number of objects and they never decrease… I think the memory leak is there, but as always I can’t be sure.

The dictionaries are for a big part from the leak with JSON function retaining them. But let’s see what the engineers at Xojo Inc. find.

2 Likes

Nope, not a single dictionary in the simple app. My money is that a library that xojo depends on has been given an update that has caused the leak.

See case 64456 - JSONItem ToString leaks memory.

Feel free to reproduce it. But for me a lot of arrays and dictionaries get leaked. Especially if I look on a sample app like Eddies Electronics, where each listbox item causes such a leak when its JSON is created.

1 Like

Thanks Christian, after your response yesterday I looked for your feedback. I agree that dictionaries lose memory because I did some testing yesterday. If I can I’ll create an example file, but I think yours is already enough.

But does the ExecuteJavaScript command use JSONItem ToString ? Because I just did some testing and it leaks memory in my opinion. Example

It does. Everything is sent to the browser using JSON.

Thanks for the clarification! So I don’t create any feedback? Do you want me to attach the example or add a comment to Christian’s feedback for testing ?

I would love to be able to set the maximum available sockets, and indeed the ssl and non ssl socket numbers and ports at compile time, or even afterwards. It would be awesome to be able to do that in the Open event of the application. Or give us a pre-open event, or give us a command to start the servers before which we can change such things or something. Often managing the command line options is a pain in the neck or just impractical.

Please PLEASE tell me there will be a hot fix for this for 2019r3.2. I have been trying to fix this issue for some time as well. It would take us quite some time to move the web applications we have to 2021rx.x. We have begun the process but still need several months to complete the projects. Right now we are resetting the server applications every three days to deal with the memory issues.

If you have a sample project to show memory leak for Web 2019r3.2, please let me know.

I thought we may offer a special timer to look regularly for orphaned objects and release them. But only if we can do it safely.

Excellent!! Our main project web application has the most extensive memory leaks, anything will help at this point. It starts at memory use around 67MB, within 24 hours, it’s up to 1.2GB! It run on Linux Ubuntu 18.04 LTS. Thank You!!

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.