apache在windows下崩溃的问题:libapr-1.dll

dukq 2011-02-23 02:19:30
软件版本:apache 2.2.17 32位
操作系统:windows 2008企业版SP2 64位
作用:主要用apache+webdav做网络硬盘使用。
测试:局域网内部

出现的问题:
如果不对下载限速的话,apache在带宽达到一定程度之后,会拒绝后来的下载请求,因此肯定需要对每个下载链接进行限速。
现用mod_bw进行限速,但是出现apache崩溃的情况,既apache的工作线程重启。在限速512kbps的时候,带宽占用达到22%左右的时候,会出现崩溃的情况;限速256kbps的时候,带宽占用达到11%左右也会崩溃。Windows日志显示如下:
错误应用程序 httpd.exe,版本 2.2.17.0,时间戳 0x4d5ba89d,错误模块 libapr-1.dll,版本 1.4.2.0,时间戳 0x4d5ba60c,异常代码 0xc0000005,错误偏移量 0x0000d6b1, 进程 ID 0xf9c,应用程序启动时间 0x01cbce47ead95a35。

在网上找了很多libapr-1.dll的资料,但是没有给出解决方案。在apache服务器上安装VS2008,重新编译apache和mod_bw也没办法解决这个问题。

不知道各位同仁有没有出现这样的情况,如何解决,还是没法解决。
...全文
1800 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
dukq 2011-03-01
  • 打赏
  • 举报
回复
我把注销掉的全部删除了。以下依次是httpd.conf,httpd-mpm.conf,httpd-dav.conf文件的配置内容

httpd.conf
-----------------------
ServerRoot "C:/Apache2.2"
Listen 8080

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule status_module modules/mod_status.so
LoadModule bw_module modules/mod_bw.so

LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User daemon
Group daemon

</IfModule>
</IfModule>

ServerAdmin admin@localhost.com

ServerName localhost:8088

DocumentRoot "C:/Apache2.2/htdocs"

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

<Directory "C:/Apache2.2/htdocs">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny
Allow from all

</Directory>

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog "logs/error.log"

LogLevel warn

<IfModule log_config_module>

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog "logs/access.log" common

</IfModule>

<IfModule alias_module>

ScriptAlias /cgi-bin/ "C:/Apache2.2/cgi-bin/"

</IfModule>

<IfModule cgid_module>

</IfModule>

<Directory "C:/Apache2.2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>

TypesConfig conf/mime.types

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

</IfModule>

EnableMMAP off
EnableSendfile off

Win32DisableAcceptEx

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

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

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

<IfModule cache_module>

<IfModule disk_cache_module>
CacheRoot "C:/Apache2.2/cache"
CacheEnable disk /vpupdate
CacheDirLevels 2
CacheDirLength 10
CacheMaxFileSize 15728640
CacheMinFileSize 10
</IfModule>
</IfModule>

# Bandwidth limited module
BandwidthModule On
ForceBandWidthModule On
Bandwidth all 65535
MinBandwidth all -1

httpd-mpm.conf
--------------------------
<IfModule mpm_winnt_module>
ThreadsPerChild 1000
MaxRequestsPerChild 5000
</IfModule>

httpd-dav.conf
-----------------------------

DavLockDB "C:/Apache2.2/var/DavLock"

Alias /uploads "D:/uploads"

<Directory "D:/uploads">
Dav On

Order Allow,Deny
Allow from all

AuthType Digest
AuthName DAV-upload

AuthUserFile "C:/Apache2.2/user.passwd"
AuthDigestProvider file

<LimitExcept GET PUT MOVE DELETE MKCOL PROPFIND OPTIONS PROPPATCH>
require user admin
</LimitExcept>
</Directory>

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

  • 打赏
  • 举报
回复
问题格式写得不错,但后面问题光说明了现象,没有把自己的配置贴出来,不利于别人分析。以后提问时注意这一点,会更容易得到帮助。
dukq 2011-02-25
  • 打赏
  • 举报
回复
解决了,这个问题是由于apache的内存泄露导致的。
在windows下,最好把以下两项设为Off
EnableMMAP Off
EnableSendfile Off

还有就是最好加上
Win32DisableAcceptEx
这样可以消除一些潜在的故障

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧