in reply to Re^4: CGI::Application file uploads buffering
in thread CGI::Application file uploads buffering

Do your filesystem, OS, perl, and apache installs support files larger than 2GB? 2**32 == 4294967296 (4GB), and the signed version of that value is 2GB, you are limited to 2GB unless all of the above use file offsets of greater than 2**32. Search for "largefile".

Update: Specifically, run perl -V | grep -i largefile and see what it says. Mine has uselargefiles=define and -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' in the output. I seem to remember Apache having the same type of configuration, I know that my filesystem has to have a flag set to support large files, and operating systems have not always supported files larger than 2**31-1.

--MidLifeXis

Replies are listed 'Best First'.
Re^6: CGI::Application file uploads buffering
by Anonymous Monk on Mar 25, 2011 at 09:19 UTC
    Genius! perl -V | grep -i largefile shows
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef cc='/usr/sfw/bin/gcc', ccflags ='-D_REENTRANT -fno-strict-aliasing + -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFS +ET_BITS=64 -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_S +AFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_S +AFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_S +AFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -DPERL_USE_S +AFE_PUTENV -DPERL_USE_SAFE_PUTENV',
    So it does have the two things you mentioned. httpd -V says:
    Server version: Apache/2.2.8 (Unix) Server built: Apr 24 2008 11:03:10 Server's Module Magic Number: 20051115:11 Server loaded: APR 1.2.12, APR-Util 1.2.12 Compiled using: APR 1.2.12, APR-Util 1.2.12 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/opt/custom/apache" -D SUEXEC_BIN="/opt/custom/apache/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf"
    I don't see anything similar about large file support. The os is Solaris 2.10. I don't know how to check it for large file support.
Re^6: CGI::Application file uploads buffering
by Anonymous Monk on Mar 28, 2011 at 10:32 UTC
    Any further ideas? Anthing else I can check?

      How about, from your os, creating a file over 2GB in size on the partition where the temp files are created (under solaris, ISTR that being a tmpfs / memfs file system - directly from your VM system), as well as where you are ultimately trying to upload it to. You can do this with perl or cat fairly rapidly.

      Another item might be the CGI maximum file upload size.

      --MidLifeXis

        Thanks I can make 4GB files with the mkfile command. How can I check or set the CGI max file upload size in a CGI::Application?