免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3968 | 回复: 0

[Web] apache自动重启故障 [复制链接]

论坛徽章:
0
发表于 2010-09-06 15:10 |显示全部楼层
本帖最后由 caoshaocong 于 2010-09-06 15:18 编辑

下载服务器(只有apache)自动重启故障:


从error日志中截取了自动重启的日志:
  1. [Mon Sep 06 15:07:14 2010] [notice] Child 3620: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.
  2. [Mon Sep 06 15:07:14 2010] [notice] Parent: Received restart signal -- Restarting the server.
  3. [Mon Sep 06 15:07:14 2010] [warn] (OS 10038)在一个非套接字上尝试了一个操作。  : setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.
  4. httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.4.30 for ServerName
  5. [Mon Sep 06 15:07:14 2010] [notice] Apache/2.2.11 (Win32) configured -- resuming normal operations
  6. [Mon Sep 06 15:07:14 2010] [notice] Server built: Dec 10 2008 00:10:06
  7. [Mon Sep 06 15:07:14 2010] [notice] Parent: Created child process 6076
  8. httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.4.30 for ServerName
  9. httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.4.30 for ServerName
  10. [Mon Sep 06 15:07:14 2010] [notice] Child 6076: Child process is running
  11. [Mon Sep 06 15:07:15 2010] [notice] Child 3620: Released the start mutex
  12. [Mon Sep 06 15:07:15 2010] [notice] Child 6076: Acquired the start mutex.
  13. [Mon Sep 06 15:07:15 2010] [notice] Child 6076: Starting 350 worker threads.
  14. [Mon Sep 06 15:07:15 2010] [notice] Child 6076: Starting thread to listen on port 80.
  15. [Mon Sep 06 15:07:16 2010] [warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
复制代码
apache 配置:
  1. #
  2. # This is the main Apache HTTP server configuration file. It contains the
  3. # configuration directives that give the server its instructions.
  4. # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
  5. # In particular, see
  6. # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
  7. # for a discussion of each configuration directive.
  8. #
  9. # Do NOT simply read the instructions in here without understanding
  10. # what they do. They're here only as hints or reminders. If you are unsure
  11. # consult the online docs. You have been warned.
  12. #
  13. # Configuration and logfile names: If the filenames you specify for many
  14. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  15. # server will use that explicit path. If the filenames do *not* begin
  16. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  17. # with ServerRoot set to "D:/Program Files/Apache Software Foundation/Apache2.2" will be interpreted by the
  18. # server as "D:/Program Files/Apache Software Foundation/Apache2.2/logs/foo.log".
  19. #
  20. # NOTE: Where filenames are specified, you must use forward slashes
  21. # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
  22. # If a drive letter is omitted, the drive on which httpd.exe is located
  23. # will be used by default. It is recommended that you always supply
  24. # an explicit drive letter in absolute paths to avoid confusion.

  25. #
  26. # ServerRoot: The top of the directory tree under which the server's
  27. # configuration, error, and log files are kept.
  28. #
  29. # Do not add a slash at the end of the directory path. If you point
  30. # ServerRoot at a non-local disk, be sure to point the LockFile directive
  31. # at a local disk. If you wish to share the same ServerRoot for multiple
  32. # httpd daemons, you will need to change at least LockFile and PidFile.
  33. #
  34. ServerRoot "D:/Program Files/Apache Software Foundation/Apache2.2"

  35. #
  36. # Listen: Allows you to bind Apache to specific IP addresses and/or
  37. # ports, instead of the default. See also the <VirtualHost>
  38. # directive.
  39. #
  40. # Change this to Listen on specific IP addresses as shown below to
  41. # prevent Apache from glomming onto all bound IP addresses.
  42. #
  43. #Listen 12.34.56.78:80
  44. Listen 80

  45. #
  46. # Dynamic Shared Object (DSO) Support
  47. #
  48. # To be able to use the functionality of a module which was built as a DSO you
  49. # have to place corresponding `LoadModule' lines at this location so the
  50. # directives contained in it are actually available _before_ they are used.
  51. # Statically compiled modules (those listed by `httpd -l') do not need
  52. # to be loaded here.
  53. #
  54. # Example:
  55. # LoadModule foo_module modules/mod_foo.so
  56. #
  57. LoadModule actions_module modules/mod_actions.so
  58. LoadModule alias_module modules/mod_alias.so
  59. LoadModule asis_module modules/mod_asis.so
  60. LoadModule auth_basic_module modules/mod_auth_basic.so
  61. #LoadModule auth_digest_module modules/mod_auth_digest.so
  62. #LoadModule authn_alias_module modules/mod_authn_alias.so
  63. #LoadModule authn_anon_module modules/mod_authn_anon.so
  64. #LoadModule authn_dbd_module modules/mod_authn_dbd.so
  65. #LoadModule authn_dbm_module modules/mod_authn_dbm.so
  66. LoadModule authn_default_module modules/mod_authn_default.so
  67. LoadModule authn_file_module modules/mod_authn_file.so
  68. #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  69. #LoadModule authz_dbm_module modules/mod_authz_dbm.so
  70. LoadModule authz_default_module modules/mod_authz_default.so
  71. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  72. LoadModule authz_host_module modules/mod_authz_host.so
  73. #LoadModule authz_owner_module modules/mod_authz_owner.so
  74. LoadModule authz_user_module modules/mod_authz_user.so
  75. LoadModule autoindex_module modules/mod_autoindex.so
  76. #LoadModule cache_module modules/mod_cache.so
  77. #LoadModule cern_meta_module modules/mod_cern_meta.so
  78. LoadModule cgi_module modules/mod_cgi.so
  79. #LoadModule charset_lite_module modules/mod_charset_lite.so
  80. #LoadModule dav_module modules/mod_dav.so
  81. #LoadModule dav_fs_module modules/mod_dav_fs.so
  82. #LoadModule dav_lock_module modules/mod_dav_lock.so
  83. #LoadModule dbd_module modules/mod_dbd.so
  84. #LoadModule deflate_module modules/mod_deflate.so
  85. LoadModule dir_module modules/mod_dir.so
  86. #LoadModule disk_cache_module modules/mod_disk_cache.so
  87. #LoadModule dumpio_module modules/mod_dumpio.so
  88. LoadModule env_module modules/mod_env.so
  89. #LoadModule expires_module modules/mod_expires.so
  90. #LoadModule ext_filter_module modules/mod_ext_filter.so
  91. #LoadModule file_cache_module modules/mod_file_cache.so
  92. #LoadModule filter_module modules/mod_filter.so
  93. #LoadModule headers_module modules/mod_headers.so
  94. #LoadModule ident_module modules/mod_ident.so
  95. #LoadModule imagemap_module modules/mod_imagemap.so
  96. LoadModule include_module modules/mod_include.so
  97. #LoadModule info_module modules/mod_info.so
  98. LoadModule isapi_module modules/mod_isapi.so
  99. #LoadModule ldap_module modules/mod_ldap.so
  100. #LoadModule logio_module modules/mod_logio.so
  101. LoadModule log_config_module modules/mod_log_config.so
  102. #LoadModule log_forensic_module modules/mod_log_forensic.so
  103. #LoadModule mem_cache_module modules/mod_mem_cache.so
  104. LoadModule mime_module modules/mod_mime.so
  105. #LoadModule mime_magic_module modules/mod_mime_magic.so
  106. LoadModule negotiation_module modules/mod_negotiation.so
  107. #LoadModule proxy_module modules/mod_proxy.so
  108. #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  109. #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  110. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  111. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  112. #LoadModule proxy_http_module modules/mod_proxy_http.so
  113. #LoadModule rewrite_module modules/mod_rewrite.so
  114. LoadModule setenvif_module modules/mod_setenvif.so
  115. #LoadModule speling_module modules/mod_speling.so
  116. #LoadModule ssl_module modules/mod_ssl.so
  117. #LoadModule status_module modules/mod_status.so
  118. #LoadModule substitute_module modules/mod_substitute.so
  119. #LoadModule unique_id_module modules/mod_unique_id.so
  120. #LoadModule userdir_module modules/mod_userdir.so
  121. #LoadModule usertrack_module modules/mod_usertrack.so
  122. #LoadModule version_module modules/mod_version.so
  123. #LoadModule vhost_alias_module modules/mod_vhost_alias.so

  124. <IfModule !mpm_netware_module>
  125. <IfModule !mpm_winnt_module>
  126. #
  127. # If you wish httpd to run as a different user or group, you must run
  128. # httpd as root initially and it will switch.
  129. #
  130. # User/Group: The name (or #number) of the user/group to run httpd as.
  131. # It is usually good practice to create a dedicated user and group for
  132. # running httpd, as with most system services.
  133. #
  134. User daemon
  135. Group daemon

  136. </IfModule>
  137. </IfModule>

  138. # 'Main' server configuration
  139. #
  140. # The directives in this section set up the values used by the 'main'
  141. # server, which responds to any requests that aren't handled by a
  142. # <VirtualHost> definition. These values also provide defaults for
  143. # any <VirtualHost> containers you may define later in the file.
  144. #
  145. # All of these directives may appear inside <VirtualHost> containers,
  146. # in which case these default settings will be overridden for the
  147. # virtual host being defined.
  148. #

  149. #
  150. # ServerAdmin: Your address, where problems with the server should be
  151. # e-mailed. This address appears on some server-generated pages, such
  152. # as error documents. e.g. admin@your-domain.com
  153. #
  154. ServerAdmin mahau@tneggyik.com

  155. #
  156. # ServerName gives the name and port that the server uses to identify itself.
  157. # This can often be determined automatically, but we recommend you specify
  158. # it explicitly to prevent problems during startup.
  159. #
  160. # If your host doesn't have a registered DNS name, enter its IP address here.
  161. #
  162. #ServerName d2.xxx.com:80

  163. #
  164. # DocumentRoot: The directory out of which you will serve your
  165. # documents. By default, all requests are taken from this directory, but
  166. # symbolic links and aliases may be used to point to other locations.
  167. #
  168. DocumentRoot "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs/xxx/d2"

  169. #
  170. # Each directory to which Apache has access can be configured with respect
  171. # to which services and features are allowed and/or disabled in that
  172. # directory (and its subdirectories).
  173. #
  174. # First, we configure the "default" to be a very restrictive set of
  175. # features.
  176. #
  177. <Directory />
  178. Options FollowSymLinks
  179. AllowOverride None
  180. Order deny,allow
  181. Deny from all
  182. </Directory>

  183. #
  184. # Note that from this point forward you must specifically allow
  185. # particular features to be enabled - so if something's not working as
  186. # you might expect, make sure that you have specifically enabled it
  187. # below.
  188. #

  189. #
  190. # This should be changed to whatever you set DocumentRoot to.
  191. #
  192. <Directory "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
  193. #
  194. # Possible values for the Options directive are "None", "All",
  195. # or any combination of:
  196. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  197. #
  198. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  199. # doesn't give it to you.
  200. #
  201. # The Options directive is both complicated and important. Please see
  202. # http://httpd.apache.org/docs/2.2/mod/core.html#options
  203. # for more information.
  204. #
  205. Options FollowSymLinks

  206. #
  207. # AllowOverride controls what directives may be placed in .htaccess files.
  208. # It can be "All", "None", or any combination of the keywords:
  209. # Options FileInfo AuthConfig Limit
  210. #
  211. AllowOverride None

  212. #
  213. # Controls who can get stuff from this server.
  214. #
  215. Order allow,deny
  216. Allow from all

  217. </Directory>

  218. #
  219. # DirectoryIndex: sets the file that Apache will serve if a directory
  220. # is requested.
  221. #
  222. <IfModule dir_module>
  223. DirectoryIndex index.html
  224. </IfModule>

  225. #
  226. # The following lines prevent .htaccess and .htpasswd files from being
  227. # viewed by Web clients.
  228. #
  229. <FilesMatch "^\.ht">
  230. Order allow,deny
  231. Deny from all
  232. Satisfy All
  233. </FilesMatch>

  234. #
  235. # ErrorLog: The location of the error log file.
  236. # If you do not specify an ErrorLog directive within a <VirtualHost>
  237. # container, error messages relating to that virtual host will be
  238. # logged here. If you *do* define an error logfile for a <VirtualHost>
  239. # container, that host's errors will be logged there and not here.
  240. #
  241. ErrorLog "logs/error.log"

  242. #
  243. # LogLevel: Control the number of messages logged to the error_log.
  244. # Possible values include: debug, info, notice, warn, error, crit,
  245. # alert, emerg.
  246. #
  247. LogLevel warn

  248. <IfModule log_config_module>
  249. #
  250. # The following directives define some format nicknames for use with
  251. # a CustomLog directive (see below).
  252. #
  253. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  254. LogFormat "%h %l %u %t \"%r\" %>s %b" common

  255. <IfModule logio_module>
  256. # You need to enable mod_logio.c to use %I and %O
  257. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  258. </IfModule>

  259. #
  260. # The location and format of the access logfile (Common Logfile Format).
  261. # If you do not define any access logfiles within a <VirtualHost>
  262. # container, they will be logged here. Contrariwise, if you *do*
  263. # define per-<VirtualHost> access logfiles, transactions will be
  264. # logged therein and *not* in this file.
  265. #
  266. CustomLog "logs/access.log" common

  267. #
  268. # If you prefer a logfile with access, agent, and referer information
  269. # (Combined Logfile Format) you can use the following directive.
  270. #
  271. #CustomLog "logs/access.log" combined
  272. </IfModule>

  273. <IfModule alias_module>
  274. #
  275. # Redirect: Allows you to tell clients about documents that used to
  276. # exist in your server's namespace, but do not anymore. The client
  277. # will make a new request for the document at its new location.
  278. # Example:
  279. # Redirect permanent /foo http://d2.xxx.com/bar

  280. #
  281. # Alias: Maps web paths into filesystem paths and is used to
  282. # access content that does not live under the DocumentRoot.
  283. # Example:
  284. # Alias /webpath /full/filesystem/path
  285. #
  286. # If you include a trailing / on /webpath then the server will
  287. # require it to be present in the URL. You will also likely
  288. # need to provide a <Directory> section to allow access to
  289. # the filesystem path.

  290. #
  291. # ScriptAlias: This controls which directories contain server scripts.
  292. # ScriptAliases are essentially the same as Aliases, except that
  293. # documents in the target directory are treated as applications and
  294. # run by the server when requested rather than as documents sent to the
  295. # client. The same rules about trailing "/" apply to ScriptAlias
  296. # directives as to Alias.
  297. #
  298. ScriptAlias /cgi-bin/ "D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"

  299. </IfModule>

  300. <IfModule cgid_module>
  301. #
  302. # ScriptSock: On threaded servers, designate the path to the UNIX
  303. # socket used to communicate with the CGI daemon of mod_cgid.
  304. #
  305. #Scriptsock logs/cgisock
  306. </IfModule>

  307. #
  308. # "D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased
  309. # CGI directory exists, if you have that configured.
  310. #
  311. <Directory "D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
  312. AllowOverride None
  313. Options None
  314. Order allow,deny
  315. Allow from all
  316. </Directory>

  317. #
  318. # DefaultType: the default MIME type the server will use for a document
  319. # if it cannot otherwise determine one, such as from filename extensions.
  320. # If your server contains mostly text or HTML documents, "text/plain" is
  321. # a good value. If most of your content is binary, such as applications
  322. # or images, you may want to use "application/octet-stream" instead to
  323. # keep browsers from trying to display binary files as though they are
  324. # text.
  325. #
  326. DefaultType text/plain

  327. <IfModule mime_module>
  328. #
  329. # TypesConfig points to the file containing the list of mappings from
  330. # filename extension to MIME-type.
  331. #
  332. TypesConfig conf/mime.types

  333. #
  334. # AddType allows you to add to or override the MIME configuration
  335. # file specified in TypesConfig for specific file types.
  336. #
  337. #AddType application/x-gzip .tgz
  338. #
  339. # AddEncoding allows you to have certain browsers uncompress
  340. # information on the fly. Note: Not all browsers support this.
  341. #
  342. #AddEncoding x-compress .Z
  343. #AddEncoding x-gzip .gz .tgz
  344. #
  345. # If the AddEncoding directives above are commented-out, then you
  346. # probably should define those extensions to indicate media types:
  347. #
  348. AddType application/x-compress .Z
  349. AddType application/x-gzip .gz .tgz

  350. #
  351. # AddHandler allows you to map certain file extensions to "handlers":
  352. # actions unrelated to filetype. These can be either built into the server
  353. # or added with the Action directive (see below)
  354. #
  355. # To use CGI scripts outside of ScriptAliased directories:
  356. # (You will also need to add "ExecCGI" to the "Options" directive.)
  357. #
  358. #AddHandler cgi-script .cgi

  359. # For type maps (negotiated resources):
  360. #AddHandler type-map var

  361. #
  362. # Filters allow you to process content before it is sent to the client.
  363. #
  364. # To parse .shtml files for server-side includes (SSI):
  365. # (You will also need to add "Includes" to the "Options" directive.)
  366. #
  367. #AddType text/html .shtml
  368. #AddOutputFilter INCLUDES .shtml
  369. </IfModule>

  370. #
  371. # The mod_mime_magic module allows the server to use various hints from the
  372. # contents of the file itself to determine its type. The MIMEMagicFile
  373. # directive tells the module where the hint definitions are located.
  374. #
  375. #MIMEMagicFile conf/magic

  376. #
  377. # Customizable error responses come in three flavors:
  378. # 1) plain text 2) local redirects 3) external redirects
  379. #
  380. # Some examples:
  381. #ErrorDocument 500 "The server made a boo boo."
  382. #ErrorDocument 404 /missing.html
  383. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  384. #ErrorDocument 402 http://d2.xxx.com/subscription_info.html
  385. #

  386. #
  387. # EnableMMAP and EnableSendfile: On systems that support it,
  388. # memory-mapping or the sendfile syscall is used to deliver
  389. # files. This usually improves server performance, but must
  390. # be turned off when serving from networked-mounted
  391. # filesystems or if support for these functions is otherwise
  392. # broken on your system.
  393. #
  394. #EnableMMAP off
  395. #EnableSendfile off

  396. # Supplemental configuration
  397. #
  398. # The configuration files in the conf/extra/ directory can be
  399. # included to add extra features or to modify the default configuration of
  400. # the server, or you may simply copy their contents here and change as
  401. # necessary.

  402. # Server-pool management (MPM specific)
  403. #Include conf/extra/httpd-mpm.conf

  404. # Multi-language error messages
  405. #Include conf/extra/httpd-multilang-errordoc.conf

  406. # Fancy directory listings
  407. #Include conf/extra/httpd-autoindex.conf

  408. # Language settings
  409. #Include conf/extra/httpd-languages.conf

  410. # User home directories
  411. #Include conf/extra/httpd-userdir.conf

  412. # Real-time info on requests and configuration
  413. #Include conf/extra/httpd-info.conf

  414. # Virtual hosts
  415. #Include conf/extra/httpd-vhosts.conf

  416. # Local access to the Apache HTTP Server Manual
  417. #Include conf/extra/httpd-manual.conf

  418. # Distributed authoring and versioning (WebDAV)
  419. #Include conf/extra/httpd-dav.conf

  420. # Various default settings
  421. Include conf/extra/httpd-default.conf

  422. # Secure (SSL/TLS) connections
  423. #Include conf/extra/httpd-ssl.conf
  424. #
  425. # Note: The following must must be present to support
  426. # starting without SSL on platforms with no /dev/random equivalent
  427. # but a statically compiled-in mod_ssl.
  428. #
  429. <IfModule mpm_winnt.c>
  430. ThreadsPerChild 350
  431. MaxRequestsPerChild 7000
  432. </IfModule>
  433. <IfModule ssl_module>
  434. SSLRandomSeed startup builtin
  435. SSLRandomSeed connect builtin
  436. </IfModule>
  437. NameVirtualHost 192.168.4.30:80
  438. <VirtualHost 192.168.4.30:80>
  439. DocumentRoot "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs/xxx/d1"
  440. ServerName d1.xxx.com
  441. </VirtualHost>
复制代码
这个问题是什么原因造成的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP