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.

5 Likes

Highly request this as well

+10000000000000

2 Likes

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.

1 Like

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!!

It looks like 2021r1.1 fixes that. We have several instances of a 24/7 web app that suffered from the leak. Ram would jump from 15 megs to gigs over timeā€¦ Recompiled with 2021r1.1 and the leak is gone. So you might want to try to recompile and see if it works for you.

Just be aware that there seems to be an issue if you use response.file in handleurl (see my post Handleurl WebResponse.file vs WebRequest.file change since 2021r1)

We canā€™t go beyond 2019r3.x at this point because Web 2 is not a viable option for us yet.
Whatever helped with 2021r1.1 please backport to 2019r3.

1 Like

Does this exist if you back down to 2018r3?