httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Lampa <>
Subject [PATCH] garbage_coll() not called in proxy if filsystem full
Date Wed, 19 Mar 1997 20:03:22 GMT

> Symptoms:
> When the cache filesystem is full, garbage_coll() is never called,
> and the filesystem remains full indefinitely.
> Description:
> 1. garbage_coll() is called only when proxy_cache_tidy() successfully
> writes new cached file. When the filesystem is full, this never happens.
> proxy_cache_tidy() returns prematurely, garbage_coll() at the end
> of the proxy_cache_tidy() is not called, and cache remains full.
> 2. If $CACHEDIR/.time doesn't exist and the filesystem is full, garbage_coll()
> ends prematurely and doesn't clean anything.

Here is the patch for above and two another bugs:
1. Cache cleanup when the cache filesystem is full - fixes only #1 of
   the report. I don't think that #2 is critical (failure of cache 
   cleanup if $CACHE/.time cannot be created since the filesystem is full).
2. Incomplete cache file left if origin server didn't send Content-Length 
   header and the client has aborted transfer.
3. Incomplete cache file left if origin server didn't send Content-Length 
   header and bwrite() to client has failed.

Fix for #1 - move garbage_coll() from proxy_cache_tidy() to the end 
             of http_handler() and ftp_handler().
Fix for #2 - delete cache file if connection->aborted in proxy_cache_tidy() 
Fix for #3 - delete cache file if bwrite() fails in send_fb() 

							Petr Lampa

Department of Computer Science and Engineering  E-mail:
Faculty of El. Engineering and Comp. Science	Phone: (+420 5) 7275/225,111
Technical University of Brno			Fax:  (+420 5) 41211141
Bozetechova 2, 612 66 Brno, Czech Republic

View raw message