httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: apreqXXXXXX temp files remain after processing uploads greater than 256kb. Further large upload fails
Date Fri, 09 Mar 2007 16:13:03 GMT
Joe Schaefer <joe+gmane@sunstarsys.com> writes:

> "Vinay Y S" <vinay.ys@gmail.com> writes:
>
>> There is a problem with apreq temp file cleanup on win32. For each
>> POST request with POST body greater than 256KB, TWO temp files of
>> exact same size get created in temp directory and they are not deleted
>> even after the request is handled. They get deleted when apache server
>> is stopped.
>
> Thanks for the detailed report and patch!
> What version of apr are you using?  The reason I ask is 
> because whenever you open a file, normally a pool cleanup hook is
> registered to close it.

Ah, I see now. I should have looked at the source before opening
my mouth ;-):

    flag = APR_CREATE | APR_READ | APR_WRITE | APR_EXCL | APR_BINARY;
    /* Win32 needs the following to remove temp files.
     * XXX: figure out why the APR_SHARELOCK flag works;
     * a grep through the httpd sources seems to indicate
     * it's only used in sdbm files??
    */
#ifdef WIN32
    flag |= APR_FILE_NOCLEANUP | APR_SHARELOCK;
#endif
    rc = apr_file_mktemp(fp, tmpl, flag, pool);

Randy, do you know why we use the APR_FILE_NOCLEANUP flag?  Maybe
we should just remove that and see if it fixes the problem Vinay
is seeing.

-- 
Joe Schaefer


Mime
View raw message