Xojo Cloud apps stop firing timers

I have noticed that some of my Xojo Cloud hosted apps stop firing their Timers (not WebTimers) if the UI is not loaded frequently. Is this intended behavior? I have a Timer that fires every 4 hours which needs to run a synchronization job to keep some data updated for a client and unless I keep visiting the app it stops firing after awhile.

1 Like

CGI apps will close without activity unless you tell them not too. Need to add App.AutoQuit = False into your open event.

Great, thanks, I was hoping it was something simple I had missed.

I have an app that does a database request and then spends a minute or two writing to a pdf file. At a minute it stops working and the pdf doesn’t show in the pageviewer.

Think this is the solution?

Tried it . . . Didn’t work.

[quote=474190:@John Scanlan]I have an app that does a database request and then spends a minute or two writing to a pdf file. At a minute it stops working and the pdf doesn’t show in the pageviewer.

Think this is the solution?

Tried it . . . Didn’t work.[/quote]

Are you able to reproduce this in a test app? If so, I would create a bug report in Feedback.

[quote=474190:@John Scanlan]I have an app that does a database request and then spends a minute or two writing to a pdf file. At a minute it stops working and the pdf doesn’t show in the pageviewer.

Think this is the solution?

Tried it . . . Didn’t work.[/quote]
Unlikely. Make sure you put that pdf assembly code in a webthread and make sure it yields periodically.

Greg . . . What do you mean yields periodically? Webthread?

This used to work.

Yes. YouÂ’d do the work in the Run event and if you have any loops or long running processes, you call Self.Sleep periodically with an amount of time to yield to other threads. If you donÂ’t, the app basically locks up, stops responding to the connected browsers and they disconnect.

If thatÂ’s the case, whatÂ’s changed between then and now?

[quote=474299:@John Scanlan]Greg . . . What do you mean yields periodically? Webthread?
This used to work.[/quote]

This thread was about server side timers not firing, where as your query seems to be about fulfilling a long running user request… how are they related? Perhaps you could explain your process exactly. Locking up a session for a minute or two is a long time for a user to wait…

23 hrs ago, @John Scanlan asked:

ThatÂ’s how we got on WebThreads.

[quote=474328:@Greg O’Lone]23 hrs ago, @John Scanlan asked:

ThatÂ’s how we got on WebThreads.[/quote]

That seems to be how you got on the WebThreads…

[quote=474299:@John Scanlan]Greg . . . What do you mean yields periodically? Webthread?

This used to work.[/quote]

Which is why I asked him to explain exactly what his process is doing.

I have an app that does a database request and then spends a minute or two writing to a pdf file using the Real Basic version of FPDF (www.fpdf.org). It writes cell by cell with borders like this: http://www.circleconsulting.us/CircleCalcTokyo%202020-02-04.pdf.

At a minute it stops working and the pdf doesn’t show in the pageviewer.

It worked up until a few months ago.

Greg . . . what may have changed is the version of Xojo and then I tried to cut down on the number of database requests to speed it up but it hasn’t worked.

What version of Xojo were you using before?

Once we know that, looking at the list I provided over here may help track this down.

I update Xojo each time a revision comes out

Found it. . . . The app works in 2019 r1.1 but not 2019 r2.