Interesting Problem - Updateing cgi app

I just made a small change and wend to update the app and I get an error, “Server said: Filename: Text file busy”

I looked at the database that is tied to the app and a record was created this morning, so he may just have the last page open, there by locking the file.

What’s the best way to handle this.

I finally went in ssh and killed the process.

Is there something I can put in that will kill the app if it’s inactive?

That is the way to do it. I have an app that simply delivers software to a user when I make a sale. So it is pretty simple. Normally, a process where the user is no longer doing anything is supposed to die after a while. I recently found out the hard way that it was not the case : numerous sessions where still active, one must have got stuck and as a result the app did not launch anymore. All sessions had to be killed to come back to normal.

Timer + App.quit ?

But what happens if a user decides to visit your site just at the moment you quit ?

You may find our blog post helpful:

http://1701software.com/blog/upgrading_xojo_cgi_apps.php

tldr; check for the cgi file every so often, kill app if its not found. when updating, delete the cgi first and wait the interval you selected so the app shuts down (and new users don’t start a new one inadvertently).