[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Ok to restart Apache?

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-03-13 01:40:35 CET

On 08.03.2005, at 07:24, Ryan Schmidt wrote:
>> We serve through an Apache 2 server that's also used for many other
>> things, and it happens probably at least weekly that some
>> configuration
>> needs to be changed, which then means Apache has to be restarted. This
>> is done at times when people could certainly be committing to the
>> repository. As long as we always do a graceful restart, it seems to me
>> that it should not be possible for this to cause any problems for
>> Subversion. Do I see that correctly? What Subversion problems could be
>> caused by doing a normal non-graceful Apache restart? Would an ongoing
>> transaction simply be aborted, or do we risk repository corruption?
>>
>> We're using Subversion 1.1.2 on Gentoo Linux with a single FSFS
>> repository. Client access is exclusively through Apache -- no svnserve
>> or direct file:/// access (although we do have a post-commit hook
>> which
>> does various things with svn and svnlook with direct file:/// URLs).

On 08.03.2005, at 16:46, Peter Kahn wrote:

> Restarting actually isn't necessary. You can perform a graceful via
> the
> apachectl. For all new connections, the new settings will be applied.
> This allows you to avoid a restart. Please be sure of two things:
>
> 1. you are performing the action as the appropriate user
> if apache or svn_user started apache and now you are acting
> upon as root, that could lead to permissions issues
>
> 2. you apachectl is the right one.
> If you have multiple installation of apache, then you may perform
> the graceful upon the wrong one. This can lead to a variety of
> confusing
> situations.
>
> I recommend performing a which apachectl
> and then double checking the version of apachectl

As I said, I do a graceful restart, and I wanted to confirm that this
would cause no problems.

I do not believe you are correct with your statements about the root
user. I believe that (re)starting Apache as the root user should not be
a problem, since Apache switches itself to the apache user. In fact, I
believe Apache must be started as root. Anyway we have never had any
problems with this in the past.

We do not use apache2ctl directly; we use the init.d scripts provided
with Gentoo Linux. There should be no problem with it using the wrong
version of the script, since AFAIK there should be only one on the
server.

As I wrote, I also wanted to know what would happen if an administrator
other than myself did not use the graceful restart mechanism. Would
that cause any problems? Would that corrupt the repository? As I said,
we're using FSFS, not BDB, so I'm hopeful that the worst that could
happen would be that someone's commit would be interrupted and they'd
have to try it a second time, but I wanted to ask to make sure. If
repository corruption is possible by restarting Apache non-gracefully,
then I must make this extremely clear to our other administrators or
even block this command.

Thank you for your input.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Mar 13 01:44:23 2005

This is an archived mail posted to the Subversion Users mailing list.