Solving the Internal Server Error 500 problem

  1. 5 weeks ago

    Ralph A

    Aug 14 Santa Monica, California

    I find Xojo CGI apps very vulnerable to returning a status 500 (user gets an Internal Server Error 500) when they're asleep and hit by a mobile browser. I never see this happen when hitting a woke Xojo CGI app. So I've handled this by setting App.AutoQuit=False, starting the app and letting it run. I haven't seen a status 500 since doing this.

    However, since it's still theoretically possible to get a status 500 when hitting a woke Web CGI app (though I've not seen that in my logs), I have a helper CGI app poll the main CGI app for status 500 hourly, and restart it if found. For the helper CGI app to be able to restart the main CGI app, it takes advantage of a special timer in the main CGI app (http://www.dev.1701software.com/blog/2013/09/08/upgrading-xojo-cgi-apps ).

  2. Michel B

    Aug 14 Pre-Release Testers, Xojo Pro RubberViews.com

    Thanks for posting the blog URL. Since 1701 became ServerWarp, I could not locate it.

    BTW I do get the 500 error now and then, when one of my cgi apps becomes unresponsive. I then reboot the server and it takes care of it.

    I cannot move out easily, because I have at least a half dozen domains and all the fonts and programs for instant download.

    Besides Xojo Cloud which would not support all my domains anyway, any suggestions of alternatives ?

  3. 4 weeks ago

    Ralph A

    Aug 15 Santa Monica, California

    @Michel B BTW I do get the 500 error now and then, when one of my cgi apps becomes unresponsive. I then reboot the server and it takes care of it.

    Assuming you have the App timer running (that kills the app if the CGI file is absent), why don't you don't just rename the CGI file, and then rename it back? And if that works, why not just have the App timer also kill the app if no sessions are present?

  4. Ralph A

    Aug 16 Santa Monica, California

    I see that Paul Budd found he also had to make sure CGI apps run with App.AutoQuit=False to keep them from being unresponsive (in his XDC 2019 video on Web app development). I wish I had thought of this a long time ago.

or Sign Up to reply!