i have a webapp running on linux ubuntu 14.04, i build with xojo r3.1, i see multiple open process of the app cgi file, but no closed automatic, when the count of this process get more than 100 the server stop listen on apache port 80. I have setup autoquit=true but the app never close and the cgi file increase and increase when people connected to the app.
i have a webapp running on linux ubuntu 14.04, i build with xojo r3.1, i see multiple open process of the app cgi file, but no closed automatic, when the count of this process get more than 100 the server stop listen on apache port 80. I have setup autoquit=true but the app never close and the cgi file increase and increase when people connected to the app.[/quote]
I had this issue of ghost sessions with previous versions but it does not happen with 2014R3.1. You may have a problem of circular references or something that remains active and prevents the autoquit to take place.
As a workaround, in previous versions where that happened, I have used a timer and do a session.quit after a reasonable delay.
Thanks Michael, i check my webapp and i don’t found something like a circular reference, or maybe i don’t know wha this mean exactly. Can you explain more about circular reference, posible situation that create this. I compile my webapp with autoport and cgi, my web server have ubuntu 14.04 with plesk 12, i running php as fastcgi, i see some time my webapp is open on multiple port and i only have one instance installed. I set app.autoquit = true and session.timeout=300, both never fired.
I open my connection to the database in session.open, and is remain open during the session still open, maybe i need to close this connection to session.timeout start counting and fire?
First of all, I don’t think Session.Timeout does what you think it does. It is for figuring out how long it has been since the user typed a key or moved their mouse. If you want to control how long it takes for a session to be destroyed after the framework notices the user has left your app, it is hard coded to 3 minutes prior to 2014r3 and then there is a property on the App class named App.SessionTimeout which lets you control this.
As far as the cgi instances hanging around, don’t use fastcgi with web apps. In that mode, the os assumes that the scripts should stick around, waiting for another connection, but this functionality was removed a while ago because it never worked quite right.
Circular references are when two objects hold a reference to one another. When that happens, neither of the objects will ever go out of scope and therefore will never be destroyed. If you’ve got cgi instances hanging around though, the problem is probably not in your app. I’d look at the server logs and see if there are any errors occurring.
Thanks Greg, you make my day, i change the server from fastcgi to cgi and set the app.sessiontimeout = 15, now is working as expected.