httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe_schae...@yahoo.com>
Subject Re: tmp file get's stored twice during HTTP Upload
Date Mon, 23 Mar 2009 15:47:30 GMT
Use a hard link, don't move it.  That's what the
perl glue does.




________________________________
From: Felix Nensa <nensa@zeec.biz>
To: Joe Schaefer <joe_schaefer@yahoo.com>
Sent: Monday, March 23, 2009 11:45:17 AM
Subject: Re: tmp file get's stored twice during HTTP Upload

Thank you Joe, that did the trick. 

One more question on fileuploads :-)
Would it be ok to just move the temp file "/tmp/apreqXXXXXX" to a different location instead
of using apreq_brigade_fwrite() ?
apreq_brigade_fwrite() works exactly as expected but just moving the file should speed things
up (as long we stay on the same partition). Or are there any gotchas I am not aware of?

Best regards,

Felix


2009/3/23 Joe Schaefer <joe_schaefer@yahoo.com>

You need to call ap_discard_request_body to prevent
apreq from creating an internal copy of the POST data.




________________________________
From: Felix Nensa <nensa@zeec.biz>
To: apreq-dev@httpd.apache.org
Sent: Monday, March 23, 2009 8:16:39 AM
Subject: Re: tmp file get's stored twice during HTTP Upload


No idea? 
Do you need more info or code? Just tell me what you need to investigate this issue and I'll
do my best to provide it.

Best regards,

Felix


2009/3/19 Felix Nensa <nensa@zeec.biz>

Hello guys,

first of all thank you for libapreq2 ... it greatly eases module development and provides
a real nice API :-)

I've just installed the latest libapreq2 release and played around with HTTP file uploads.

I've written a simple module that does nothing but copy the uploaded file to another file
using apreq_brigade_fwrite().
Examining my temp dir during an upload (122M file) I was wondering why the temp file that
I suppose to hold the file bucket get created and filled up twice. 

Here are some ls snapshots from my temp dir during an upload. Am I missing something or why
do I see apreq42MmiO and apreqkUS2cX?

Best regards,

Felix



[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 0
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 80M
-rw------- 1 apache apache 40M Mar 19 18:31 apreq42MmiO
-rw------- 1 apache apache 40M Mar 19 18:31 apreqkUS2cX
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 130M
-rw------- 1 apache apache 65M Mar 19 18:31 apreq42MmiO
-rw------- 1 apache apache 65M Mar 19 18:31 apreqkUS2cX
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 197M
-rw------- 1 apache apache 99M Mar 19 18:31 apreq42MmiO
-rw------- 1 apache apache 99M Mar 19 18:31 apreqkUS2cX
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 250M
-rw------- 1 apache apache 122M Mar 19 18:31 apreq42MmiO
-rw------- 1 apache apache 122M Mar 19 18:31 apreqkUS2cX
-rw-r--r-- 1 apache apache 6.8M Mar 19 18:31 upload.test
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 253M
-rw------- 1 apache apache 122M Mar 19 18:31 apreq42MmiO
-rw------- 1 apache apache 122M Mar 19 18:31 apreqkUS2cX
-rw-r--r-- 1 apache apache 9.5M Mar 19 18:31 upload.test
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 301M
-rw------- 1 apache apache 122M Mar 19 18:31 apreq42MmiO
-rw------- 1 apache apache 122M Mar 19 18:31 apreqkUS2cX
-rw-r--r-- 1 apache apache  59M Mar 19 18:31 upload.test
[felix@radiohead modules]# ls -lh /var/cache/mod_cod/
total 122M
-rw-r--r-- 1 apache apache 122M Mar 19 18:31 upload.test

-- System --
libapreq2-2.12
Server version: Apache/2.2.3
Server built:   Nov 12 2008 10:41:27
2.6.18-92.1.22.el5xen

-- httpd.conf --
LoadModule apreq_module       modules/mod_apreq2.so
APREQ2_ReadLimit     1024M
APREQ2_BrigadeLimit  10K
APREQ2_TempDir       /var/cache/mod_cod


      
Mime
View raw message