App works then stops with server error.

This has happened a few times. An app is running fine for Months, then suddenly it just shows a internal server error.

I then re-upload the files and it works fine again???

Anybody know what could cause this?

Thanks

Rich

Happened to me, same solution, no idea what is causing it.

Does Anybody have any ideas???

Standalone or CGI app?

Reason I ask, is that I have a client that had the same issue with a standalone app that would crash with an internal error every couple of weeks. Sounds like a memory leak issue which can be hard to track down. He decided to restart the app every night at 3 AM. Since then, no problems.

This is cgi. I doubt it’s a memory leak as the app is not used that much. How could you test something like that of a very active web site?

See you in Austin.

Rich

What server are you running this on?
Not sure why do you need to upload the files again, can you restart the app after it goes offline?
In linux I have a script running in cron to ensure the app is running. I also check memory usage in my script and act on the results accordingly.

Suddenly when you go to the url for the app it shows the internal server error. I have gone and made sure the process was not running, no matter what you do in order to get it working you have to upload the files again.

The app is a form for our members to renew. It is only running when someone is filling in the data and credit card info.

This is running on a Linux VPS using Apache. What other info do you need.

It would be hard to diagnose without access to the server. I would check your Apache error logs, system messages and view top while someone fills out the form. I had issues with hard drives once causing the system to muck up and stop apps randomly. Since you are running a vps and I am guessing it is hosted, I doubt this is your issue.

I have the same issue. My web app is running in ubuntu server with plesk. Every 3 days the web app is freeze and i need to login via SSH to the server a run the command killall -9 myappname and the app running again.

[quote=179964:@Richard Albrecht]Suddenly when you go to the url for the app it shows the internal server error. I have gone and made sure the process was not running, no matter what you do in order to get it working you have to upload the files again.

The app is a form for our members to renew. It is only running when someone is filling in the data and credit card info.

This is running on a Linux VPS using Apache. What other info do you need.[/quote]
Could you show us the actual text that’s shown in your browser? It may help us narrow down where the problem is?

The next time it happens I will. But it’s just an Generic Internal Server error. Nothing special as I remember.

We have same problem now and then when we press toolbarbutton - in 99% of the pushes it works fine but for no reason we get a server error (crashed server - standalone).

What VPS and OS are you running?

I know for a fact that AWS micro instances will scale CPU time down when the load get too high over extended periods.

I have had a db front end running for over a year now on standalone and it has not missed a beat. I have not had more than 20 people on at once and its running on an m1.small AWS instance. It was built with 2014 r1.1 I think?

I have a script running every night which purges unused memory from Linux and cron is setup to start my app on reboot.

Its going to be impossible to diagnose without some deeper logging.
If you have access as root (or even a privileged user) you can easily filter error messages and post them here. Is that an option?

Sorry for the delay, life sometimes gets in the way.

when you say filter error logs, what should I look for.

VPS - VM Ware ESXI
OS Ubuntu 12.04

If your going to be in Austin I’ll be there.

Have a look in /var/log/apache2/error.log and grep for keywords is probably the easiest way to figure out what is happening. The following will show “live” what is happening so try and crash your app while running it. You will need to hit control c to stop it.

tail -f /var/log/apache2/error.log

Other log files of interest may be /var/log/syslog and /var/messages

To filter results do the following

cat /var/log/apache2/error.log | grep -E error

Swap error for other keywords or regex that may be of interest

To test for memory issues nothing beats the good old top command. It will show you sortable columns by cpu load, memory usage, swap etc

It just happened again. App was running fine then suddenly throws the error.

Can’t find anything in the logs.

I have the same problem… Many apps compiled with preview xojo version working fine, recompiled with the last one don’t work! Internal server error…

CGI mode is basically bad. It’s much slower than standalone and eventually it will stall out for no apparent reason. I’ve noticed with many customers that the Xojo app will freeze/stall/end up in an inconsistent state but still be running. Apache runs the CGI which tries to start a new process since the old one is not responding. Of course you cannot run two at the same time and you end up with an Internal Server Error. If you SSH in and kill your app suddenly it will work again.

tldr; Don’t use CGI mode.

I’m sorry Pillip, but in my case i’ve tested it on a server that I use here locally, where the webapp was never installed before…

Phillip, I’ll take your advice any day, especially since I am one of your satisfied customers at 1701Software.com. But not using CGI is not that simple. When I started with Xojo Web, there was so little practical information about how to use standalone on a server, I stayed with cgi which I have known since I used Perl back in the nineties. Upload, make sure permissions are right, and on you go with your life.

I have read time and again in the forums how much better standalone was, yet to this day there is no simple step by step how to document anywhere that shows how to implement standalone, for instance on your server. Case in point :

  • how do I automate the standalone app start when system boots ?
  • how do I make sure my standalone app is always alive ?

I cannot see myself monitoring manually through SSH and restarting the app with the command line. And replies like “just use cron” or “create another app to monitor” are both vague and not detailed enough.

Without a clear way of doing that automatically, I rather use CGI. Like, incidentally, Xojo Cloud…

I know you have been putting some work in a solution. When, or will it be available ? Will it be simple to use ?