Time out issue?

I am not sure this is a fix on the Xojo side or the server side, but…

My Xojo program (Portman) imports large amounts of data from my broker into a mariadb, (and it generates reports and other action later). But the web page loses the connection to the xojo program before the xojo program is done doing its processes…

I have to refresh and re-login to the program via the webpage. How do I keep the web page connected to the server while the program is still processing the imports?

Xojo Web apps are single core just like all Xojo executables. A blocking procedure will prevent all users from communicating with the app.

I’m curious how long your import procedure takes that it’s disconnecting you from the session.

As a workaround, if you thread the import code (you may need to add explicit yields), the framework will time slice the import procedure and communicating with users to hopefully avoid disconnections.

For an even more smooth experience, perhaps the import data routine could be a helper app that runs as it’s own process.

some can take 15 minutes or more; it parses some of the .txt files slow as it has to search the database for duplicate entries first.

For a 15 minute task I would recommend an external import helper if you can.

The upside to a helper console app doing this is that you wouldn’t need to worry about yields or the main loop since its sole task is to import the data.

If you don’t have a license that builds console apps, you could do this with a second web app as the helper. Put everything in the App.Opening event and Quit as the last instruction.

Sounds like a good plan… I will give that a try.