Hi all,
I am trying to run a web-based PHP application on a CentOS 5 32-bit machine that requires me to upload large files. The machine also happens to have little RAM (256MB).
I have no problem setting my upload limit ( upload_max_filesize ) to 1 GB but for some reason 2 GB or above seems to be no go. Would anybody know why? Could it be one of the many 32-bit vs 64-bit issues?
Thanks.
Boris.
2010/6/9 Boris Epstein borepstein@gmail.com:
Hi all,
I am trying to run a web-based PHP application on a CentOS 5 32-bit machine that requires me to upload large files. The machine also happens to have little RAM (256MB).
I have no problem setting my upload limit ( upload_max_filesize ) to 1 GB but for some reason 2 GB or above seems to be no go. Would anybody know why? Could it be one of the many 32-bit vs 64-bit issues?
add more swap and memory ?
-- Eero
On Wed, Jun 9, 2010 at 3:25 PM, Eero Volotinen eero.volotinen@iki.fi wrote:
2010/6/9 Boris Epstein borepstein@gmail.com:
Hi all,
I am trying to run a web-based PHP application on a CentOS 5 32-bit machine that requires me to upload large files. The machine also happens to have little RAM (256MB).
I have no problem setting my upload limit ( upload_max_filesize ) to 1 GB but for some reason 2 GB or above seems to be no go. Would anybody know why? Could it be one of the many 32-bit vs 64-bit issues?
add more swap and memory ?
-- Eero _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Eero,
I've got 4 GB of swap. At the moment all 4 GB less 100 MB of it is available. That logically should be enough to allow me to upload a 2 GB file, I would think.
Boris.
2010/6/9 Boris Epstein borepstein@gmail.com:
I have no problem setting my upload limit ( upload_max_filesize ) to 1 GB but for some reason 2 GB or above seems to be no go. Would anybody know why? Could it be one of the many 32-bit vs 64-bit issues?
Other PHP settings, like post_max_size, also can affect large uploads. Google is your friend on this.
Whit
On 06/09/2010 12:32 PM, Boris Epstein wrote:
Eero,
I've got 4 GB of swap. At the moment all 4 GB less 100 MB of it is available. That logically should be enough to allow me to upload a 2 GB file, I would think.
Looking at the bugtracker: http://bugs.centos.org/view.php?id=3118
"PHP is not built with large file support on 32 bit x86, probably other 32 bit platforms, all releases of CentOS 4 Additional Information I verified that upstream does not have this problem. It is severe enough for my use (scientific processing) that I am changing OS."
While the report is for CentOS4, it may be related to your problem.
On Wed, Jun 9, 2010 at 3:47 PM, Jerry Franz jfranz@freerun.com wrote:
On 06/09/2010 12:32 PM, Boris Epstein wrote:
Eero,
I've got 4 GB of swap. At the moment all 4 GB less 100 MB of it is available. That logically should be enough to allow me to upload a 2 GB file, I would think.
Looking at the bugtracker: http://bugs.centos.org/view.php?id=3118
"PHP is not built with large file support on 32 bit x86, probably other 32 bit platforms, all releases of CentOS 4 Additional Information I verified that upstream does not have this problem. It is severe enough for my use (scientific processing) that I am changing OS."
While the report is for CentOS4, it may be related to your problem.
-- Benjamin Franz
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
OK, at least part of it could have been related to the machine being 32 bit. I am currently playing with a 64 bit machine. I can set my upload_max_filesize = 2G and that works fine; however, post_max_size is a problem. if I set it to 2 G it seems to fail (no POST transactions go through, it seems). If I set it just a tad lower (what I have now is post_max_size = 1948M ) it works fine. So the cutoff limit is somewhere in the 2G neighborhood.
Any idea why that would be? Is there a parameter anywhere that limits how far post_max_size may go? The total memory setting I use is way above ( memory_limit = 6G ) and that seems not to cause any issues.
Thanks for your advice everybody.
Cheers,
Boris.
On Fri, Jun 11, 2010 at 10:59 AM, Boris Epstein borepstein@gmail.com wrote:
On Wed, Jun 9, 2010 at 3:47 PM, Jerry Franz jfranz@freerun.com wrote:
On 06/09/2010 12:32 PM, Boris Epstein wrote:
Eero,
I've got 4 GB of swap. At the moment all 4 GB less 100 MB of it is available. That logically should be enough to allow me to upload a 2 GB file, I would think.
Looking at the bugtracker: http://bugs.centos.org/view.php?id=3118
"PHP is not built with large file support on 32 bit x86, probably other 32 bit platforms, all releases of CentOS 4 Additional Information I verified that upstream does not have this problem. It is severe enough for my use (scientific processing) that I am changing OS."
While the report is for CentOS4, it may be related to your problem.
-- Benjamin Franz
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
OK, at least part of it could have been related to the machine being 32 bit. I am currently playing with a 64 bit machine. I can set my upload_max_filesize = 2G and that works fine; however, post_max_size is a problem. if I set it to 2 G it seems to fail (no POST transactions go through, it seems). If I set it just a tad lower (what I have now is post_max_size = 1948M ) it works fine. So the cutoff limit is somewhere in the 2G neighborhood.
Any idea why that would be? Is there a parameter anywhere that limits how far post_max_size may go? The total memory setting I use is way above ( memory_limit = 6G ) and that seems not to cause any issues.
Thanks for your advice everybody.
Cheers,
Boris.
Here's what further research on the topic indicates: it is unclear whether or not PHP can handle files in excess of 2 GB in size. If it can that would still be a relatively recent achievement. So in short it sounds like - at this point in time - it may be safest simply not to try to handle files that size.
See here:
http://www.bigresource.com/PHP-is-there-a-limit-to-post_max_size--1sjou1Ke.h...
http://www.bigresource.com/PHP-PHP-2GB-filesize-limit-pfHnjwXh.html
http://bugs.php.net/bug.php?id=27792
Boris.
On Fri, Jun 11, 2010 at 11:30 AM, Boris Epstein borepstein@gmail.com wrote:
On Fri, Jun 11, 2010 at 10:59 AM, Boris Epstein borepstein@gmail.com wrote:
On Wed, Jun 9, 2010 at 3:47 PM, Jerry Franz jfranz@freerun.com wrote:
On 06/09/2010 12:32 PM, Boris Epstein wrote:
Eero,
I've got 4 GB of swap. At the moment all 4 GB less 100 MB of it is available. That logically should be enough to allow me to upload a 2 GB file, I would think.
Looking at the bugtracker: http://bugs.centos.org/view.php?id=3118
"PHP is not built with large file support on 32 bit x86, probably other 32 bit platforms, all releases of CentOS 4 Additional Information I verified that upstream does not have this problem. It is severe enough for my use (scientific processing) that I am changing OS."
While the report is for CentOS4, it may be related to your problem.
-- Benjamin Franz
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
OK, at least part of it could have been related to the machine being 32 bit. I am currently playing with a 64 bit machine. I can set my upload_max_filesize = 2G and that works fine; however, post_max_size is a problem. if I set it to 2 G it seems to fail (no POST transactions go through, it seems). If I set it just a tad lower (what I have now is post_max_size = 1948M ) it works fine. So the cutoff limit is somewhere in the 2G neighborhood.
Any idea why that would be? Is there a parameter anywhere that limits how far post_max_size may go? The total memory setting I use is way above ( memory_limit = 6G ) and that seems not to cause any issues.
Thanks for your advice everybody.
Cheers,
Boris.
Here's what further research on the topic indicates: it is unclear whether or not PHP can handle files in excess of 2 GB in size. If it can that would still be a relatively recent achievement. So in short it sounds like - at this point in time - it may be safest simply not to try to handle files that size.
See here:
http://www.bigresource.com/PHP-is-there-a-limit-to-post_max_size--1sjou1Ke.h...
http://www.bigresource.com/PHP-PHP-2GB-filesize-limit-pfHnjwXh.html
http://bugs.php.net/bug.php?id=27792
Boris.
Continuing the search...
Looks like the LimitRequestBody directive for Apache may make some difference: http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
Set mine to 5B ~ 5GB. Looks like I can at least submit a 2.4 GB upload request now.
Boris.
I have no problem setting my upload limit ( upload_max_filesize ) to 1 GB but for some reason 2 GB or above seems to be no go. Would anybody know why? Could it be one of the many 32-bit vs 64-bit issues?
upload_max_size is not the only variable that would affect uploading. You may also want to look at the settings for:
post_max_size -- uploading files is done through the HTTP POST mechanism so this has to be at least as big as upload_max_size memory_limit -- If memory limits are enabled, this also must be larger then upload_max_size
It may also be a 32bit limit as well:
(from php.net) Note: PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.