Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter matanzari

    (@matanzari)

    Hey,

    The issue came up right after the update, without manually clicking ‘speed up my site’.

    From what we see the cause of the issue is the shutdown hook which transfers 25 objects (posts, terms, etc) to the new tables.
    Database stats shows that the high load comes from write operations, which I guess are the writes to the new table.

    Using the cli is also an option (I see that this is supported), but before doing so I need to know how long this is going to take. The best option for me here is as follows:

    • update Yoast
    • disable indexables lazy load completely
    • run the process via cli when traffic is low (maybe at night)
    • enable indexables lazy load (I guess this is not needed)

    Is that possible? I see that there is a filter for the amount of items to transfer on shutdown – what happens if I set this to 0?

    Thanks,
    Matan.

    Hey,

    Submitted a new topic here, thanks for clarifying.

    I also encounter DB issues (mostly high cpu usage) in the last update (14.5) due to the indexing feature (had to downgrade).

    We have a relatively large database (~250K posts) and from what we see the indexing process itself (hooked into the shutdown hook) dramatically affects DB performance (cpu usage reached ~60% within 5 minutes after the update).

    WP version: 5.3.1
    Yoast version: 14.5

    Thread Starter matanzari

    (@matanzari)

    Great, thank you.

    • This reply was modified 3 years, 9 months ago by matanzari.
    Thread Starter matanzari

    (@matanzari)

    Hey,

    Thanks for the quick reply. Just wanted to make sure this isn’t called in cases Im not aware of.

    Thread Starter matanzari

    (@matanzari)

    Updated solution:

    
    add_filter( 'cloudinary_upload_options', function( $options, $attachment_post, $upload_object ){
      
      /**
      * Structure of options as follows:
      $options = array(
        'unique_filename' => false, // Allow for auto filenames. See Cloudinary docs.
        'resource_type'   => $resource_type, // Type can be 'image' or 'video' or custom.
        'public_id'       => $public_id, // Changing this will change the public ID as stored in Cloudinary.
        'context'         => array(
          'caption' => esc_attr( $post->post_title ), // Set the caption data in Cloudinary.
          'alt'     => $post->_wp_attachment_image_alt, // set the alt text of the asset in Cloudinary
        ),
      );
      **/
      
      // To change the asset public_id. this can be any valid public id
      $options['public_id'] = $options['public_id'] . '-custom-text';
      
      return $options;
    }, 10, 3 );
    
Viewing 6 replies - 1 through 6 (of 6 total)