Hi All,
I am trying to test accelerated upload on nginx/php-fpm/php-cgi setup
and
comparing different scenarios
e.g one where /temp is a tmpfs, one where it is a disk partition and you
will also notice where in i test using php-cgi. as i need to understand
which can handle file uploads faster.
location ~ \.php$ {
include fastcgi_params;
client_body_temp_path /temp;
fastcgi_pass_request_body off;
client_body_in_file_only on;
fastcgi_param REQUEST_BODY_FILE $request_body_file;
#use php-cgi
#fastcgi_pass 127.0.0.1:10005;
#use php-fpm
fastcgi_pass 127.0.0.1:9000;
fastcgi_index $dir_index;
fastcgi_param DOCUMENT_ROOT $doc_root;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
}
i encountered one issue where in the /temp is a tmpfs (size is just
1GB),
after uploading a couple of files i encountered this: *58 pwrite()
“/temp/0000000053” failed (28: No space left on device)
shouldn’t it be flushed once the upload is done? or do i need to add
some
config to flush it automatic?
Im using a php script that uses curl to do the uploading, here’s the
script
that manages the upload (curlupload.php)
i removed the file after it is uploaded so i can run this script in
loop,
the script that uploads the file: (testupload.php)
Another thing i noticed is that when not using tmpfs, I/O is high the
server when this is set:
client_body_temp_path /temp;
fastcgi_pass_request_body off;
client_body_in_file_only on;
fastcgi_param REQUEST_BODY_FILE $request_body_file;
Thank You in advance, any help or idea would be appreciated.
Regards,
Ron