From: Franky V. L. <lie...@te...> - 2008-03-31 19:40:25
|
On Mon, 31 Mar 2008 14:51:35 -0400 Bishop Bettini <ph...@id...> wrote: > Quoting Franky Van Liedekerke <lie...@te...>: > > > I can add the same logic to the survey side if wanted. But what do > > you normally do when updating? Maybe we should just have a file > > called "disabled" or so, and as long as that file is there, all > > surveys appear offline (something like "The system is undergoing an > > update, please be patient"). What do you think? > > This is an important issue in my particular case, as at any given > time there can be up to 30,000 unique people hitting the surveys at > one time. In my situation, I tell Apache to redirect to a > maintenance page, then run the update from the command line using a > script that was previously tested on a QA server. Usually the update > implies only a few seconds of down-time, which is great. Whatever > process is chosen, it must be atomic, so create a lock file, flock() > it, and run the update. Might need a method to force the lock file > too, just in case something dies (server boot)? > > bishop > How about this: I add the possibility to generate the SQL statements needed for the update, so you can save this to a file and execute it manually. That way you can update the files on your QA server, generate the SQL, test this as usual and then go to production with it. Let me know what you think about it ... I added this to svn now :) Franky |