Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author ovann86

    (@ovann86)

    Hey,

    My understand is upload limits are based on three factors – the max upload size (upload_max_filesize), max post size (post_max_size) and max memory limit (memory_limit) (although I think file chunking comes in at some point to reduce this one). The number you’re seeing on that page is the minimum of each of those values on your server, most likely the memory limit.

    Dispite that, what you see there is just for display (not an actual limit set by the plugin). I’m displaying it because many people don’t know what the server limits are. There’s nothing stopping you from configuring it as 1024 MB upload limit — but from my research you’ll run into troubles at the 256 MB mark (if that’s what you’re seeing in the message).

    If you haven’t already I suggest you give it a try with a 300 MB file and report back with how it goes. I’ll be keen to know if memory_limit is a factor.

    Thread Starter mwilliams77

    (@mwilliams77)

    I’ve made sure all 3 of those factors are set to 1GB, but I still see the 256MB message. I configured the upload limit to 1024MB but get an error when attempting to upload a 290MB file around 71%. The error message just says, “Error uploading file.”

    Plugin Author ovann86

    (@ovann86)

    It’s possible that your host doesn’t allow one of those settings to be configured above 256 MB so it’s rejecting your setting.

    I’ll have a go at setting up a local test environment and configure it to 1024 MB and see what happens.

    Plugin Author ovann86

    (@ovann86)

    I’m also considering testing out the chunking setting.

    https://github.com/blueimp/jquery-file-upload/wiki/chunked-file-uploads

    Plugin Author ovann86

    (@ovann86)

    Just an update.

    I’ve been looking into this, I was able to reproduce the issues you’ve described (upload failing mid-transfer for a large file) and then the next day (on a better internet connection) the transfer completed successfully – all the way up to 500 MB.

    I suspect the issue may be more to do with execution times/timing out. Just a guess though at this point.

    I also researched the memory_limit setting and what influence it has on upload limits – according to this discussion the PHP documentation is incorrect, memory_limit does not have any impact on upload limits. Source: https://stackoverflow.com/questions/5106871/relationship-between-php-s-memory-limit-upload-max-filesize-and-post-max-filesi

    I tested this and it appears to be correct.

    In addition to all this, it turns out that the WordPress administration (wp-admin) has a pre-defined memory limit – 256 MB – so even when I configured my memory limit to 1024 MB, the front end would report 1024 but the wp-admin would report 256 MB. There is a filter to change this, but given the first point that it has no influence on upload limits there is no point.

    So with that all in mind in the next update I’ll remove memory_limit from the displayed value – but that doesn’t resolve the upload issues with large files.

    To test the theory that it’s to do with timing out I will enable the chunking (in the next update) at a relatively low value, probably 5 MB. This way the upload script is refreshed every 5 MB. I may also look into the auto-resume feature for when an upload fails.

    I do have a question, what is your upload speed for where you were accessing the form?

    The connection it failed from is about 1.2 mbps, the connection it worked on (up to 500 MB tested) was 20 mbps (note I’m looking for the actual speed, not the speed you pay for but probably don’t ever achieve).

    Thread Starter mwilliams77

    (@mwilliams77)

    Thanks for taking the time on this. I’m getting 5.56 mbps upload speed where the upload fails. I can test on a faster connection later today.

    When do you think the next update will be rolling out?

    Thread Starter mwilliams77

    (@mwilliams77)

    The upload fails with a 10.4 mbps upload speed, also.

    Plugin Author ovann86

    (@ovann86)

    Hey,

    Im still working on this and other changes, but in the meanwhile if you wanted to test the chunking out and know how to edit your plugin files….

    In file: gravity-forms-ajax-upload.php
    you’ll find

    jQuery( 'input.itsg_ajax_upload_browse' ).fileupload( {
    add: function( e, data ) {

    place this between

    maxChunkSize: 5000000, // 5 MB

    so you end up with

    jQuery( 'input.itsg_ajax_upload_browse' ).fileupload( {
    maxChunkSize: 5000000, // 5 MB
    add: function( e, data ) {
    Plugin Author ovann86

    (@ovann86)

    Hey,

    I’m about to release an update to this plugin, version 2.0.0.

    I’m not entirely clear where I got to with looking into this – but I did end up completely re-writting the JavaScript and adding an option to configure file-chunking, which from what I can tell also enabled auto-resume for incomplete uploads.

    I dont have a server I can test load uploads with and had troubles spinning up a local one.

    Could you try again with version 2.0.0 and report back?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Max upload file size is being capped at 256MB’ is closed to new replies.