Ben Liu wrote:
Hello All,
I'm not sure this is strictly a PHP related question or perhaps a
server admin question as well. What do you do when you are trying to
shutdown a web application for maintenance (like a membership or
registration-required system)? I understand that you can temporarily
upload or activate a holding page that prevents users from continuing
to login/use the system, but how can you insure that there are no
ongoing sessions or users still in the process of doing something?
What's the best method for handling this, especially if you don't have
full control of the server hosting the web app?
Thanks for any advice,
- Ben
I normally do what you say; activate a holding page. The question comes
to mind, does it really matter if a user's session is interrupted? Is
the web application dealing with data that is critical enough (or
non-critical data in a possibly destructive manner) that you can't just
cut them off for a while?
You have to consider that users could just as easily be cut off by a
server crash, packetloss/network issues (on your end OR theirs, or
anywhere in between), or just might hit the stop button while a script
is running (Which, IIRC, ordinarily terminates the script the next time
you try to send something). If your web app works in a way such that you
can't just pull the plug and everything is fine, you're running some
pretty big risks that your app will get into unrecoverable states from
everyday issues.
If you wanted to get fancy, you could code your system to prevent new
logins, expire normal logins much faster (Say, after 15 minutes instead
of hours or days), and then wait for all users to be logged out before
continuing.
Regards, Adam Zey.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php