Where did my app go????

Why would my web application exit when all the session windows are closed?

[quote]Session closed. There are 1 sessions remaining.
Session closed. There are 0 sessions remaining.
App is shutting down: no sessions remaining.
App is shutting down:
App._Cleanup
Transactions: 26
Traffic Received: 12.5 KB
Traffic Served: 0 b
Total Traffic: 12.5 KB
Average Traffic Per Transaction: 492.5385 b
Process Completed.
CommandProcessor Ended[/quote]

On top of that I didn’t close any web page windows. I had one open, (Switched tabs in FireFox)
Running in the debugger.

My App should still run even if there are no users peeking at it by its web interface.

Do you have break on exceptions turned on?

In the App.Open event, try App.AutoQuit = False.

If you switched tabs in your browser, it’s certainly possible that JavaScript was paused on the hidden tab. If that happens, the session will eventually disconnect.

Break on exceptions was turned off and my exceptions are handled.
I think Kem is on the right track …
Tabs switching make me wonder.

I just switched my app from Windows to Linux 64 bit. I am running on an Ubuntu 16 server.
I am getting the error listed in this post. I don’t think I was getting the error when I was running on Windows though I was using AlwaysUp to run the app, so I guess it’s possible it was quitting and then being restarted by AlwaysUp. I didn’t check it prior to moving from a Windows server to a Linux server.

I have tried set app.AutoQuit = false but that hasn’t helped

I also have tried #pragma BreakOnExceptions false

Can anyone think what I might be doing wrong? or what I can do to stop the error?

Thanks

It’s not an error if you are running as cgi. Please tell us more about your app.

I did forget to mention I’m running stand alone.

Ok, so have you implemented the two UnhandledException events (App and Session) to check if your app is crashing?

It would also be worth looking at the system logs to see if the app is doing something that the system doesn’t like… like using all of the free ram or consuming too much CPU (some systems will automatically kill apps thinking that they’re hung).

Ended up being a 3rd party set of functions I was using. It was originally designed for a CGI app so in some cases it turned autoquit back to true.

Since I’m running Stand Alone I needed to change that.

Greg, not sure what you mean. What do you put in the UnhandledException events?

Logging. If your app is crashing because of an exception of some kind, you might never know.

Ohhhh. Ok. Yep, I got that covered.