<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Restart Apache without closing open connections</title>
	<atom:link href="http://www.tech-recipes.com/rx/110/restart-apache-without-closing-open-connections/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/110/restart-apache-without-closing-open-connections/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Sat, 21 Nov 2009 22:16:28 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: bofh468</title>
		<link>http://www.tech-recipes.com/rx/110/restart-apache-without-closing-open-connections/comment-page-1/#comment-27</link>
		<dc:creator>bofh468</dc:creator>
		<pubDate>Tue, 11 Nov 2003 14:23:56 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-27</guid>
		<description>Failing to find &lt;strong&gt;apachectl&lt;/strong&gt;, one could just find the PID of the parent httpd process and send a -USR1 signal to it.

For example:

&lt;code&gt;
$ ps -ef &#124; grep httpd
root     17723     1  0 Sep23 ?        00&#58;00&#58;01 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3666 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3667 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3668 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3669 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3670 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3671 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3672 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D
apache    3673 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D

$ kill -USR1 17723
&lt;/code&gt;


a -USR1 signal will cause any new children to run with a new configuration, but leave the current children running as-is.  A -HUP signal will kill off all current children and cause new requests to be serviced under the new configuration.

Of course, one could be a little more sophisticated:

&lt;code&gt;

$ ps -ef &#124; grep httpd &#124; grep root &#124; awk &#039;&#123;print $2&#125;&#039; &#124; xargs kill -HUP

&lt;/code&gt;


That said, apachectl is a lot cleaner.</description>
		<content:encoded><![CDATA[<p>Failing to find <strong>apachectl</strong>, one could just find the PID of the parent httpd process and send a -USR1 signal to it.</p>
<p>For example:</p>
<p><code><br />
$ ps -ef | grep httpd<br />
root     17723     1  0 Sep23 ?        00&#58;00&#58;01 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3666 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3667 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3668 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3669 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3670 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3671 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3672 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D<br />
apache    3673 17723  0 Nov09 ?        00&#58;00&#58;00 /usr/sbin/httpd -DHAVE_ACCESS -D</p>
<p>$ kill -USR1 17723<br />
</code></p>
<p>a -USR1 signal will cause any new children to run with a new configuration, but leave the current children running as-is.  A -HUP signal will kill off all current children and cause new requests to be serviced under the new configuration.</p>
<p>Of course, one could be a little more sophisticated:</p>
<p><code></p>
<p>$ ps -ef | grep httpd | grep root | awk '&#123;print $2&#125;' | xargs kill -HUP</p>
<p></code></p>
<p>That said, apachectl is a lot cleaner.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
