Login | Register
My pages Projects Community openCollabNet

Discussions > users > Avoiding downtime while updating the Current database

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

Avoiding downtime while updating the Current database

Reply

Author jpportz
Full name Jeremy Portzer
Date 2003-03-05 11:52:32 PST
Message One of the problems with the 1.4 series of current is that you must
shutdown your web server while running "cadmin update" or other cadmin
commands. Although I realize this may be changing in the upcoming
postgres backend, for now it can be quite a pain if you use your current
server's Apache for something else.

Here's a strategy for working around this problem.
    * make a version of current.httpd.conf that disables the XMLRPC URL
    * replace current.httpd.conf with this "disabled version" and then
restart Apache
    * run the necessary cadmin commands (i.e. "cadmin update")
    * replace current.httpd.conf with the original
    * restart Apache, which turns current back on

Since it only takes a moment to restart apache (send a HUP to its parent
PID), this minimizes downtime to your other web services while safely
updating the current databases.

I've attached a script that does this, suitable for running in cron
after your mirror downloads the latest updates. It has a lot more
verbosity than is really necessary, but it should work. For this
script, copy your existing current.httpd.conf to
current.httpd.conf.enabled. Then make a current.httpd.conf.disabled
version. My current.httpd.conf.disabled looks like this:
    <Location /XMLRPC >
    Deny from all
    </Location>
This makes every request return a 403 Forbidden. Does anyone know a way
to change this to something more appropriate like 503 Service
Unavailable?

I hope this is useful!

Regards,
Jeremy Portzer
jeremyp at pobox dot com
Attachments

« Previous message in topic | 1 of 3 | Next message in topic »

Messages

Show all messages in topic

Avoiding downtime while updating the Current database jpportz Jeremy Portzer 2003-03-05 11:52:32 PST
     Re: Avoiding downtime while updating the Current database jpportz Jeremy Portzer 2003-03-05 11:56:09 PST
         Re: Avoiding downtime while updating the Current database hunterm Hunter Matthews 2003-03-26 14:51:43 PST
Messages per page: