You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/04/05 15:47:09 UTC
DO NOT REPLY [Bug 39216] New: - mod_disk_cache trying to rename locked file, decreasing performance
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39216>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39216
Summary: mod_disk_cache trying to rename locked file, decreasing
performance
Product: Apache httpd-2
Version: 2.2-HEAD
Platform: All
OS/Version: Windows Server 2003
Status: NEW
Severity: major
Priority: P2
Component: mod_disk_cache
AssignedTo: bugs@httpd.apache.org
ReportedBy: fleger@siderlog.fr
mod_disk_cache cannot update cache for expired content (win32)
There is a problem with using mod_disk_cache in conjonction of mod_proxy.
When a file is expired in the cache, mod_disk_cache doesn't handle the backend
update correctly.
This leads to 2 differents problems:
1) The cache won't never been updated and you're loosing benefits of caching.
2) It leaves a tempfile in CacheRoot dir, making the CacheRoot dir bigger than
expected.
Messages that are displayed in error.log:
==========================================
[Wed Mar 29 10:41:40 2006] [error] (OS 5)Acc�s refus�. : disk_cache: rename
tempfile to hdrsfile failed: C:/apache_cache/aptmpcBQArf ->
C:/apache_cache/M/2fl@WQwwEqpEKxjyw7VFA.header
Steps to reproduce:
==========================================
httpd.conf:
#LogLevel warn
Listen 80
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule include_module modules/mod_include.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule unique_id_module modules/mod_unique_id.so
Timeout 300
KeepAlive On
MaxKeepAliveRequests 10000
KeepAliveTimeout 15
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>
ProxyVia on
SSLProxyEngine on
SSLSessionCache shm:C:/Apache/2.2.0/logs/ssl_gcache_data(1048576)
ServerRoot "C:/Apache/2.2.0"
DocumentRoot "C:/Apache/2.2.0"
ServerName localhost:80
# On ne doit pas avoir d'�l�ments variables dans le cache.
Header unset Vary
Header unset Expires
CacheIgnoreHeaders Set-Cookie
CacheIgnoreHeaders RequestID
CacheIgnoreHeaders TimeReq
CacheIgnoreHeaders User-Agent
CacheIgnoreHeaders Accept-Encoding
CacheIgnoreHeaders Warning
CacheIgnoreHeaders Via
# Forcer IE � cacher les �l�ments statiques.
SetEnvIf Request_URI "\.css$" force-no-vary
SetEnvIf Request_URI "\.gif$" force-no-vary
SetEnvIf Request_URI "\.hta$" force-no-vary
SetEnvIf Request_URI "\.htm$" force-no-vary
SetEnvIf Request_URI "\.html$" force-no-vary
SetEnvIf Request_URI "\.jpg$" force-no-vary
SetEnvIf Request_URI "\.js$" force-no-vary
SetEnvIf Request_URI "\.vbs$" force-no-vary
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/Apache/2.2.0/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
</FilesMatch>
ErrorLog logs/error.log
<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>
# You need to enable mod_logio.c to use %I and %O
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:/Apache/2.2.0/cgi-bin/"
</IfModule>
<Directory "C:/Apache/2.2.0/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
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Listen 81
<VirtualHost *:81>
RequestHeader set TimeReq "%t"
RequestHeader set RequestID "%{UNIQUE_ID}e"
CacheEnable disk /
CacheMaxExpire 10
CacheDefaultExpire 10
CacheLastModifiedFactor 10000000.0
CacheRoot "C:/apache_cache"
CacheDirLength 1
CacheDirLevels 1
RewriteEngine On
RewriteRule ^/(.*)$ http://some.site.com/$1 [P,L]
ProxyPassReverse / http://some.site.com/
CustomLog "| 'C:/Apache/2.2.0/bin/rotatelogs.exe' -l 'logs/vhost81_%Y%m%d.log'
86400" common
</VirtualHost>
Then issue this command:
bin\ab.exe -n 10000 -c 1024 -k -d http://some.site.com/some/file.txt
As soon as the file will be expired, you will see the problem.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 39216] - mod_disk_cache trying to rename locked file, decreasing performance
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39216>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39216
------- Additional Comments From chip@force-elite.com 2006-06-21 09:08 -------
mod_disk_cache makes several assumptions on how unix file systems operate, and
how it is safe to move files, even if they are open. Win32 doesn't really
support all of these concepts. I am not sure if we ever plan to support
mod_disk_cache on win32, at least in the current incarnation. (Patches welcome
of course)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org