Support » Plugin: WP-Stateless - Google Cloud Storage » Max file upload can’t larger 500MB, although the RAM has to 3GB

  • Resolved thaikieutrinh2018

    (@thaikieutrinh2018)


    Your Plugin better 4 plugin I tried. I hope your pluin work perfect with me

    I only 1 issue with your pluin: max file upload
    I have already set up RAM to 3GB, but I only can upload file smaller 500MB. If I upload larger file, it stuck at 100% Media upload

    Please show me why, how to fix it
    Thanks for your help

    To Thai

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Alimuzzaman Alim

    (@alimuzzamanalim)

    Hi @thaikieutrinh2018
    https://github.com/wpCloud/wp-stateless/issues/478

    It happens because the file is duplicated in memory for more than 1 location. You can see more info on the GitHub issue.

    It has been already fixed and will be published in the next release. We will be uploading files in chunks now except for new Stateless mode.

    Chunk size is determined automatically based on memory limit and file size. You can define the chunk size by using WP_STATELESS_MEDIA_UPLOAD_CHUNK_SIZE constant if needed.

    You can download the development version from here https://github.com/wpCloud/wp-stateless/tree/latest.
    If you try this version be sure that you have the correct mode selected. A new Stateless mode is introduced and the old Stateless mode is renamed to Ephemeral.

    Thanks @alimuzzamanalim for your rep soon.

    What different “Efemeral” vs “Stateless” mode?
    Should I choose what mode for my issue?
    Or, to fix my issue, have to I change value in this code?

    "public function get_chunk_size(){
            if(defined('WP_STATELESS_MEDIA_UPLOAD_CHUNK_SIZE')){
              return WP_STATELESS_MEDIA_UPLOAD_CHUNK_SIZE;
            }
            $memory_limit = ini_get('memory_limit');
            if($memory_limit){
              $memory_limit = Utility::convert_to_byte($memory_limit);
              $memory_get_usage = memory_get_usage();
              $free_memory = $memory_limit - $memory_get_usage;
            }
            else{
              $free_memory = 10 * 1024 * 1024; // Default chunk size 10MB
            }
    
            return $free_memory * 0.8;
          }
    "

    I have 1 VPS high frequency I/O SSD 1GB/s, Ram 4G, CPU 2 core. How can I config Stateless to user can upload file size 1GB?

    Plugin Author Eric Sopp

    (@ideric)

    WP-Stateless v3.0 was released today and included some features related to your feedback here. Upgrade today and enjoy the new functionality!

    how / where do I use WP_STATELESS_MEDIA_UPLOAD_CHUNK_SIZE to set the size maybe lower eg. to max 2mb. Also does chunk size = total file size or file split in to parts/chunks?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.