<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OurApache &#187; graceful</title>
	<atom:link href="http://ourapache.com/archives/tag/graceful/feed" rel="self" type="application/rss+xml" />
	<link>http://ourapache.com</link>
	<description>我们致力于一个Apache知识的分享网站</description>
	<lastBuildDate>Tue, 13 Apr 2010 05:18:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>关于apache的restart和stop, start的问题</title>
		<link>http://ourapache.com/archives/265</link>
		<comments>http://ourapache.com/archives/265#comments</comments>
		<pubDate>Wed, 12 Aug 2009 15:52:27 +0000</pubDate>
		<dc:creator>OurApache</dc:creator>
				<category><![CDATA[Apache基础知识]]></category>
		<category><![CDATA[graceful]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[start]]></category>
		<category><![CDATA[stop]]></category>

		<guid isPermaLink="false">http://www.ourapache.com/?p=265</guid>
		<description><![CDATA[昨天解决问题的时候，用restart没有生效，没有仔细研究，今天查了下资料，有点了解了。]]></description>
			<content:encoded><![CDATA[<p>昨天解决问题的时候，用restart没有生效，没有仔细研究，今天查了下资料，有点了解了。</p>
<p>stop是杀掉所有apache进程，start是启动apache进程，这点没有疑问，但是restart不等同于stop+<a href="http://ourapache.com/archives/tag/start" class="st_tag internal_tag" rel="tag" title="标签 start 下的日志">start</a></p>
<p>执行restart，只是发送SIGHUP信号，apache会杀掉所有子进程，但是父进程不关闭，apache只是重新载入配置文件和打开日志文件，然后重新生成一系列子进程。</p>
<p>另外发现了一个有趣的参数：<a href="http://ourapache.com/archives/tag/graceful" class="st_tag internal_tag" rel="tag" title="标签 graceful 下的日志">graceful</a>，使用这个参数会发送IGUSER1信号，引起主进程处理并警告收到当前请求之后的子进程结束(或在它们不做任何服务时立刻结束)，主进程将重新读取它的配置文件并打开它的日志文件，当每一个子进程结束后,主进程将使用配置信息产生一个新的子进程来立刻响应请求并为之服务。另外当配置文件有错误的时候，父进程退出，但是子进程会继续保持连接，知道子进程处理完毕（当重启服务器的时候会引起问题，端口被占用）</p>
<p>详细信息可见apache官方文档 <a href="http://httpd.apache.org/docs/2.0/stopping.html" target="_blank">http://httpd.apache.org/docs/2.0/stopping.html</a></p>
<h3  class="related_post_title">无相关文章，以下随机显示</h3><ul class="related_post"><li>2009年02月6号 -- <a href="http://ourapache.com/archives/72" title="gzip 与 deflate">gzip 与 deflate</a></li><li>2009年02月27号 -- <a href="http://ourapache.com/archives/206" title="http header详解">http header详解</a></li><li>2009年03月30号 -- <a href="http://ourapache.com/archives/232" title="Apache Prefork和Worker模式的性能比较测试">Apache Prefork和Worker模式的性能比较测试</a></li><li>2009年02月22号 -- <a href="http://ourapache.com/archives/161" title="在Windows上手动配置Apache下面的虚拟主机站点">在Windows上手动配置Apache下面的虚拟主机站点</a></li><li>2009年04月8号 -- <a href="http://ourapache.com/archives/238" title="apache软件体系结构  ">apache软件体系结构  </a></li><li>2009年09月6号 -- <a href="http://ourapache.com/archives/303" title="基于资源的HTTP Cache的实现介绍">基于资源的HTTP Cache的实现介绍</a></li><li>2009年02月25号 -- <a href="http://ourapache.com/archives/181" title="Apache并发控制、查看进程数、TCP连接、压缩功能说明">Apache并发控制、查看进程数、TCP连接、压缩功能说明</a></li><li>2009年02月6号 -- <a href="http://ourapache.com/archives/76" title="Apache 模块说明">Apache 模块说明</a></li><li>2009年02月10号 -- <a href="http://ourapache.com/archives/106" title="Apache Rewrite 规则详解">Apache Rewrite 规则详解</a></li><li>2009年04月1号 -- <a href="http://ourapache.com/archives/236" title="关于HTTP 协议中的 KeepAlive">关于HTTP 协议中的 KeepAlive</a></li></ul>
	标签：<a href="http://ourapache.com/archives/category/basic" title="Apache基础知识" rel="tag">Apache基础知识</a>, <a href="http://ourapache.com/archives/tag/graceful" title="graceful" rel="tag">graceful</a>, <a href="http://ourapache.com/archives/tag/restart" title="restart" rel="tag">restart</a>, <a href="http://ourapache.com/archives/tag/start" title="start" rel="tag">start</a>, <a href="http://ourapache.com/archives/tag/stop" title="stop" rel="tag">stop</a><br />
]]></content:encoded>
			<wfw:commentRss>http://ourapache.com/archives/265/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

