Web app hosted on Xojo Cloud. Running 2024 R1
I had some users report the web app going unresponsive for a short period and then sometimes disconnecting them, returning them back to the login page. When I play around with the built app, I don’t experience any such issues. Then again, I am not using the app as extensively as my users. The one user I was able to get additional information from, she said she noticed this on public WiFi as well as her home network. She also said it is not all the time and not specific to any area in the app. Sometimes it reconnects for her automatically where she can continue working where she was. Other times, it disconnects her and returns her to the login page
I am still a bit new to web apps (started a little over a year ago) and am still learning best practices. I checked the statistics window, but I don’t really know how to interpret this:
- CPU: 0%
- Memory: 76%
- Network: 0 bytes but when hovering over the graph, I see a max of 829 kb
- Disk: 17%
Is that memory too high? I checked the statistics last week, and I think it was in the 70s too. Of note, the above stats are for my XC server of which there are several web apps. My dropdown for Application is disabled, so I cannot see the specific stats for a specific app
If there are leaks, what is the best way to find and fix them? I don’t use global module properties. All properties are either session-based or page-based. Do I need to nil out any of the properties after they’ve been used?
I read one of the recent Xojo blogs about memory handling and recall seeing a mention of if you have an array you need to loop through, it’s best to store the LastIndex integer as a local property so you are not calling to the array’s count each time in the loop. I’m not doing anything like this yet as I wanted to check here to see if something like that is a worthwhile change I need to make
Going back to the user I email chatted with, one of the times she got disconnected was when she was reading a content article on one of the pages. This article is loaded from a db table initially, but while the article is loaded, there are no backend processes running other than a WebTimer keeping track of the user’s time spent reading, which makes me wonder about properties or other things that are still live and not destroyed. Or maybe it is the timer…