Announcement

Collapse
No announcement yet.

Database with high CPU

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Database with high CPU

    I site have high CPU and mysql is taking the power.

    Found this

    I run mysql -e 'show full processlist' and the result is alot of lines like these

    Code:
    SELECT `varname`,`languageid`,`text` FROM vb5_phrase WHERE `varname` IN ('page_4ecbdac82f039695291108_title','page_4ecbdac 82f039695291108_metadesc') AND `languageid` IN (1,0,-1)
    In my Apache log I have these lines alot (sensitive data replaced by x)

    Code:
    [Sun May 08 07:13:15.847656 2022] [php7:warn] [pid 140030] [client xxx.xxx.xxx.xxx:26147] PHP Warning: Use of undefined constant title - assumed 'title' (this will throw an Error in a future version of PHP) in /xxx/xxx/forum/core/cache/template/template62418.php on line 25
    If I run query in phpmyadmin I get 0 results.

    How can I fins what is wrong?

    #2
    That is just a PHP warning not PHP error. I don't know if that's from a third-party plugin template or from existing vB5 core template. It should be fixed but unless you're using PHP 8 where it becomes a PHP error, it shouldn't affect any functionality.

    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      Any thoughts on the mysql-query running so often?

      Comment


        #4
        From your PM, you posted the template code with the PHP warning.

        PHP Code:
          ' . ''; $title = '' . vB5_Template_Runtime:arsePhrase(($subitem[title] ?? null)) . ''; $final_rendered .= '' . ' 
        I'm not 100% sure but that looks like from the Main Navigation Menu Dropdown mod here. I updated that mod last month to support PHP 8. Try updating that mod and that PHP warning should go away.

        By default, vBulletin 5's main navigation menu only displays the sub-menu for the currently active main menu. If you are in a forum page and you want to create a new blog, you would have to click Blogs first then click "Create a New Blog". That's two clicks. If we display the sub-menus as you hover each main menu
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          For the query, it might be related to that PHP warning. Try updating the Main Navigation mod and see if the query stops running so often.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #6
            ChristianAlfredsson, any update? Is the issue fixed?
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #7
              One of these worked. I do not know the one who fixed it

              1.Change php.ini
              memory_limit = 256M

              or

              2. I also added that phraseid in phrase table is UNIQUE.

              I think one of them did it.

              Comment


                #8
                Glad to hear the issue is fixed. But that's only for the SQL query issue, right?

                For the PHP warning issue, I think the solution is to update the Main Nav Menu Dropdown mod to the latest version.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment

                Users Viewing This Page

                Collapse

                There is 1 user viewing this forum topic.

                • Guest Guest

                Latest Posts

                Collapse

                Working...
                X
                Searching...Please wait.
                An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                Please push the back button and reload the previous window.'
                An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                Please push the back button and reload the previous window.'
                An internal error has occurred and the module cannot be displayed.
                There are no results that meet this criteria.
                Search Result for "|||"