Forum Replies Created

Viewing 15 replies - 16 through 30 (of 451 total)
  • Thread Starter qnkov

    (@qnkov)

    Yes

    Thread Starter qnkov

    (@qnkov)

    @qtwrk everything is updating faster once i’ve disable object cache. For example, im not waiting 10 minutes so i can see the widget i’ve added. It shows in the frontpage right away.

    Thread Starter qnkov

    (@qnkov)

    @qtwrk

    Hm, once i’ve disable object cache, i’ve notice that things started to show up faster. What could that mean and how we fix it?

    Thread Starter qnkov

    (@qnkov)

    @qtwrk , you can say that. I mean, certain updates of the theme/plugins appears slow in the site. I’m giving new example, i have another wordpress site. So i’ve installed Decent comment plugin which shows comments in the widget. The comment widget appeard after 10-15 minutes into my homepage. And i’ve disabled that plugin, and 5 min later, i still see the comment widget. In that site i’m using the same cache plugin. I don’t know what else to look for. I dont see any other reason for that to happen, cuz i don’t have any cache plugins enabled instead litespeed cache. The other thing is that i have added real cron job instead WP, which is : */15****/opt/alt/php74/usr/bin/php -q "/home/mypath/public_html/mysite/thatsite/wp-cron.php"

    But i doubt this can effect on updates.

    This is the report from that site:

    Report number: CJTMCCVZ

    Report date: 01/31/2024 22:17:26

    • This reply was modified 9 months, 3 weeks ago by qnkov.
    • This reply was modified 9 months, 3 weeks ago by qnkov.
    Thread Starter qnkov

    (@qnkov)

    @qtwrk

    Report number: ZDRRIIVL

    Report date: 01/26/2024 17:11:10

    Thread Starter qnkov

    (@qnkov)

    @qtwrk

    Check the img – https://imgur.com/a/rJEZtrU

    I will try to explain it again. Look at the pictures I attached. In one picture you can see what it looks like when you have 1 notification to your profile and when you don’t have any. This very notification, if you click and look at it, is supposed to not show up below the bell after that. But on the home page, even if I open it, it still sits there for 10+ minutes, while on all other pages, it’s gone. I kind of have some caching, slow refresh on the home page and I don’t know why or where the problem is coming from.

    Thread Starter qnkov

    (@qnkov)

    @qtwrk

    You can see it on right corner, the bell. When someone send u private msg, view your profile, u get replay on your comment and etc, you are getting notification (number below the bell, depends on how many things happened, u may get 1 or 20.). Because i dont have any other cache enabled, it should be only litespeed that may be messing it up. I’m not sure that the plugin itself can do such conflict as it looks like cache problem.

    Like i say, for example, i’m viewing my main profile from another browse with test account, when i refresh the homepage, i’m not getting the notification number, but if i click another page of the site, it shows it. When i return to homepage, i still don’t have it, or its reverse… if i check the notifications, they may be clear on the other pages, but homepage will still shows them. Basicaly, homepage updates the things happening slower. So if u can check my images and tell me if everything looks correct.

    • This reply was modified 10 months ago by qnkov.
    Thread Starter qnkov

    (@qnkov)

    I found the problem, bad browser. You can delete my post.

    • This reply was modified 10 months ago by qnkov.
    Thread Starter qnkov

    (@qnkov)

    @missveronicatv

    What is the full fixed code, which will work without problems and heavy cpu?

    Thread Starter qnkov

    (@qnkov)

    3-4k users. I don’t remember when i switched to usermeta table. I think i had problems back then and i was told to enable it. Should i disable it now or? By the way, i’ve removed all the codes i gave u from my function.php and site works fine now. Maybe some of them was making the bad quaries?

    Thread Starter qnkov

    (@qnkov)

    @missveronicatv

    https://imgur.com/a/CxHd56v – i’ve disable cache for users after i posted. Should i unstick tables?

    And i’m using those custom codes in my function.php, could any of them doing problems?

    ////////////////////////////////////////////////////////////////////////
    // Ultimate Member Profile Display Name Integration ////////////////////
    ////////////////////////////////////////////////////////////////////////
    add_filter('wpdiscuz_comment_author', 'wpdiscuz_um_author', 10, 2);
    function wpdiscuz_um_author($author_name, $comment) {
        if ($comment->user_id) {
            $column = 'display_name'; // Other options: 'user_login', 'user_nicename', 'nickname', 'first_name', 'last_name'
            if (class_exists('UM_API') || class_exists('UM')) {
                um_fetch_user($comment->user_id); $author_name = um_user($column); um_reset_user();
            } else {
                $author_name = get_the_author_meta($column, $comment->user_id);
            }
        }
        return $author_name;
    }
    ////////////////////////////////////////////////////////////////////////
    // Ultimate Member Profile URL Integration /////////////////////////////
    ////////////////////////////////////////////////////////////////////////
    add_filter('wpdiscuz_profile_url', 'wpdiscuz_um_profile_url', 10, 2);
    function wpdiscuz_um_profile_url($profile_url, $user) {
        if ($user && (class_exists('UM_API') || class_exists('UM'))) {
            um_fetch_user($user->ID); $profile_url = um_user_profile_url();
        }
        return $profile_url;
    }
    function um_custom_validate_bot_spam( $key, $array, $args ) {
    	if ( isset( $args[$key] ) && $args[$key]  != 'ОТАКУ ФЕН' ) {
              UM()->form()->add_error( $key, __( 'Напишете думите правилно и с главни букви.', 'ultimate-member' ) );
        } 
    }
    add_action( 'um_custom_field_validation_bot_spam', 'um_custom_validate_bot_spam', 30, 3 );
    add_filter( 'auto_update_plugin', '__return_false' );
    /* Disable oEmbeds author name & author url ~ Stops Showing in embeds */
    add_filter( 'oembed_response_data', 'disable_embeds_filter_oembed_response_data_' );
    function disable_embeds_filter_oembed_response_data_( $data ) {
        unset($data['author_url']);
        unset($data['author_name']);
        return $data;
    }
    add_filter( "um_user_profile_tabs", "um_072522_add_comment_count", 1000 );
    
    function um_072522_add_comment_count( $tabs ) {
    
        if( isset( $tabs['comments'] ) && ! isset( $tabs['comments']['notifier'] ) ){ 
            $args = array(
                        'user_id' => um_profile_id(),   // Use user_id.
                        'count'   => true               // Return only the count.
                    );
    
            $comments_count = get_comments( $args );
    
            $tabs['comments']['notifier'] = $comments_count;
        }
    
        return $tabs;
    • This reply was modified 10 months ago by qnkov.
    Forum: Fixing WordPress
    In reply to: High CPU USAGE?
    Thread Starter qnkov

    (@qnkov)

    @macmanx

    I’ve got another respond from the hosting providers:

    The case is mostly caused by the “SQL_CALC_FOUND_ROWS” query. I see it used in the following plugins:

    mycred, ultimate-member, w3-total-cache and wordfence. From these we can exclude (for now) w3-total-cache and wordfence, because many other customers use them and we have not observed a similar case with them.

    It is quite possible that the case occurs either during higher traffic or during the execution of a certain function. From cPanel -> Resource usage you can monitor the resources, currently almost none are being used (I guess from the plug-ins being turned off).

    What I can recommend you is when there is more traffic to turn off the plugins 1 by 1 (by waiting a few minutes) and monitor the resource statistics.

    What i can say is, that i’m using only Ultimate member last version + wordpress last version. I will ask anyway in ultimate member forum, but if you guys can give me ideas, im reading.

    Forum: Fixing WordPress
    In reply to: High CPU USAGE?
    Thread Starter qnkov

    (@qnkov)

    The problem is that everything is so random. It works perfectly, then it does not. I’ve deactived all plugins and the site was working perfectly. I’ve reactived them, it worked again perfectly. Then i’ve got message from the hosting provider with that:

    Hello,
    
    The lines we observe are:
    
    [Warning] Aborted connection 8440202 to db: 'mydb' user: 'myuser' host: 'localhost' (Query execution was interrupted (max_statement_time exceeded))
    Aborted connection 8441215 to db: 'mydb' user: 'myuser' host: 'localhost' (Got an error writing communication packets)
    
    The case study comes from a database query execution time limit. Due to this PHP processes are not closed and CPU consumption is raised.
    I'm attaching some of the statements that reached max_statement_time:
    
    
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
                                             FROM wp_posts LEFT JOIN wp_term_relationships tr ON wp_posts.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id INNER JOIN wp_postmeta AS unique_postmeta_selector ON (wp_posts.ID = unique_id)
    postmeta_selector.post_id)
                                             WHERE 1=1 AND ( (unique_postmeta_selector.meta_value LIKE '%sword art online%' AND unique_postmeta_selector.meta_key = 'ero_japanese') OR ((wp_posts.post_title LIKE '%sword%') OR (0 LIKE '%sword%') OR (0 LIKE '%sword%')) AND ((wp_posts.post_title LIKE '%art%') OR (0 LIKE '%
    art%') OR (0 LIKE '%art%')) AND ((wp_posts.post_title LIKE '%online%') OR (0 LIKE '%online%') OR (0 LIKE '%online%'))) AND (wp_posts.post_password = '') AND ((wp_posts.post_type = 'anime' AND (wp_posts.post_status = 'publish'))) OR ((tt.taxonomy = 'post_tag' AND (t.name LIKE '%sword art online%' OR t.slug LIKE '%s
    word art online%')) AND wp_posts.post_status = 'publish' AND wp_posts.post_type = 'anime')
                                             GROUP BY wp_posts.ID
                                             ORDER BY (CASE WHEN wp_posts.post_title LIKE '%sword art online%' THEN 1 WHEN wp_posts.post_title LIKE '%sword%' AND wp_posts.post_title LIKE '%art%' AND wp_posts.post_title LIKE '%online%' THEN 2 WHEN wp_posts.post_title LIKE '%sword%' OR wp_posts.post_title LIKE '%art%' OR w
    p_posts.post_title LIKE '%online%' THEN 3 WHEN wp_posts.post_excerpt LIKE '%sword art online%' THEN 4 WHEN wp_posts.post_content LIKE '%sword art online%' THEN 5 ELSE 6 END), wp_posts.post_date DESC
                                             LIMIT 0, 12;
    
    
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
                                             FROM wp_posts LEFT JOIN wp_term_relationships tr ON wp_posts.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id INNER JOIN wp_postmeta AS unique_postmeta_selector ON (wp_posts.ID = unique_postmeta_selector .post_id)
                                             WHERE 1=1 AND ( (unique_postmeta_selector.meta_value LIKE '%sword art online%' AND unique_postmeta_selector.meta_key = 'ero_japanese') OR ((wp_posts.post_title LIKE '%sword%') OR (0 LIKE '%sword%') OR (0 LIKE '%sword%')) AND ((wp_posts.post_title LIKE '%art%') OR (0 LIKE '%art%') OR (0 LIKE '%art%')) AND ((wp_posts. post_title LIKE '%online%') OR (0 LIKE '%online%') OR (0 LIKE '%online%'))) AND (wp_posts.post_password = '') AND ((wp_posts.post_type = 'anime' AND (wp_posts.post_status = 'publish'))) OR ((tt.taxonomy = 'post_tag' AND (t.name LIKE '%sword art online%' OR t.slug LIKE '%sword art online%')) AND wp_posts .post_status = 'publish' AND wp_posts.post_type = 'anime')
                                             GROUP BY wp_posts.ID
                                             ORDER BY (CASE WHEN wp_posts.post_title LIKE '%sword art online%' THEN 1 WHEN wp_posts.post_title LIKE '%sword%' AND wp_posts.post_title LIKE '%art%' AND wp_posts.post_title LIKE '%online%' THEN 2 WHEN wp_posts.post_title LIKE '%sword%' OR wp_posts.post_title LIKE '%art%' OR wp_posts.post_title LIKE '%online%' THEN 3 WHEN wp_posts.post_excerpt LIKE '%sword art online%' THEN 4 WHEN wp_posts.post_content LIKE '%sword art online%' THEN 5 ELSE 6 END), wp_posts.post_date DESC
                                             LIMIT 0, 12;
    
    
    SELECT wp_posts.ID
                             FROM wp_posts LEFT JOIN wp_term_relationships tr ON wp_posts.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id INNER JOIN wp_postmeta AS unique_postmeta_selector ON (wp_posts.ID = unique_postmeta_selector .post_id)
                             WHERE 1=1 AND ( (unique_postmeta_selector.meta_value LIKE '%Tower %' AND unique_postmeta_selector.meta_key = 'ero_japanese') OR ((wp_posts.post_title LIKE '%Tower%') OR (0 LIKE '%Tower%') OR ( 0 LIKE '%Tower%'))) AND (wp_posts.post_password = '') AND wp_posts.post_type = 'anime' AND ((wp_posts.post_status = 'publish')) OR ((tt.taxonomy = 'post_tag' AND (t.name LIKE '%Tower %' OR t.slug LIKE '%Tower %')) AND wp_posts.post_status = 'publish' AND wp_posts.post_type = 'anime')
                             GROUP BY wp_posts.ID
                             ORDER
    

    And in the end i think it’s my theme codding, which may doing that? Can you tell me what u think and what we could do to fix this, if the theme’s developer tells me it’s not on his side?

    • This reply was modified 10 months ago by qnkov.
    Forum: Fixing WordPress
    In reply to: High CPU USAGE?
    Thread Starter qnkov

    (@qnkov)

    @bcworkz

    View post on imgur.com

    Check this image from Resource usage

    Thread Starter qnkov

    (@qnkov)

    @ov3rfly

    Thanks mate.

Viewing 15 replies - 16 through 30 (of 451 total)