Forums / General / how upload big multimedia file?

how upload big multimedia file?

Author Message

Andre Felipe Machado

Saturday 11 July 2009 8:31:09 am

Hello,
I am trying to upload a big 128 MB multimedia video file to an ezpublish site running on fcgid.
Already modified php.ini to accept much more than this file size upload.
But after some time uploading (using the multimedia form), the connection is broken.
Please, what am I missing?
Regards.
Andre Felipe Machado

---
A Debian user never dies. Issues a last command:
shutdown -h now

http://www.techforce.com.br

kracker (the)

Saturday 11 July 2009 8:45:41 am

Hello,

It sounds like you want to optimize your web server and php configurations together to avoid this error.

Which version of apache are you running?

This sounds strikingly similar to an apache 1.3 (large file upload) configuration issue I've learned to avoid over the years. set LimitRequestBody to an int (file size in bytes) value larger than your largest file.

Re: http://httpd.apache.org/docs/1.3/mod/core.html#limitrequestbody

I found I often needed this apache settings change along with the php settings changes to enable large file uploads with apache 1.3

Cheers,
//kracker

<b>References</b>
<i>
LimitRequestBody
http://stackoverflow.com/questions/757111/large-file-upload-errors-with-php
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Q_23213263.html
</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Steven E. Bailey

Saturday 11 July 2009 9:55:53 am

Depending how this is uploaded you'll probably also have to increase the post_max_size to larger than the file you want to upload and of course increase the max_input_time and also max_execution_time beyond the time it takes to upload the file.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Andre Felipe Machado

Sunday 12 July 2009 3:45:51 pm

Hello,
Thanks for your valuable hints that pointed to the solution.
The site is running Apache 2.2.x , with php on fcgid.
The LimitRequestBody is still relevant at this version
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody
And even after trying the php.ini and apache2 configs explained at
http://www.radinks.com/upload/config.php
the problem persisted.
There is a trick at fcgid configuration, with the proper php.ini and other apache settings too.
http://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests
http://httpd.apache.org/docs/2.2/mod/core.html#timeout
Tried setting fcgid
ProcessLifeTime 1600
BusyTimeout 1600
to solve the problem for this file size upload at my bandwidth.
Also, the hosting provider machine limits for ram and swap must be respected.
The file is uploaded to memory by apache.
But I am afraid this unusual values settings could open a stability problem for the server under load.
Observing the failure with top, I saw that when ram "almost" depleted (30 MB left), the upload crashed. Disabling some service to free ram changed the duration. So, I guess it is not a time limit anymore, but something related to hosting limit memory. I did not set RLimitMem so it should follow system limit. .
Any suggestions?
Regards.
Andre Felipe

---
A Debian user never dies. Issues a last command:
shutdown -h now

http://www.techforce.com.br

eZ debug

Timing: Jan 18 2025 11:11:37
Script start
Timing: Jan 18 2025 11:11:37
Module start 'content'
Timing: Jan 18 2025 11:11:38
Module end 'content'
Timing: Jan 18 2025 11:11:38
Script end

Main resources:

Total runtime0.7848 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 587.7031180.8438
Module start 'content' 0.00890.6200 768.5469616.6563
Module end 'content' 0.62890.1559 1,385.2031337.3828
Script end 0.7847  1,722.5859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00530.6779210.0003
Check MTime0.00160.2004210.0001
Mysql Total
Database connection0.00160.205210.0016
Mysqli_queries0.679086.51791990.0034
Looping result0.00250.31691970.0000
Template Total0.740094.320.3700
Template load0.00220.279220.0011
Template processing0.737894.012620.3689
Template load and register function0.00010.011610.0001
states
state_id_array0.00100.125410.0010
state_identifier_array0.00280.362220.0014
Override
Cache load0.00180.2276540.0000
Sytem overhead
Fetch class attribute can translate value0.00150.191340.0004
Fetch class attribute name0.00140.183070.0002
XML
Image XML parsing0.00200.259940.0005
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00550.6946420.0001
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs