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!
    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.

        https://vbmods.rocks/forum/vbulletin...-menu-dropdown
        Helpful? Donate. Thanks!
        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!
          Fast VPS Host for vBulletin: A2 Hosting & IONOS

          Comment


            #6
            ChristianAlfredsson
            Junior Member
            ChristianAlfredsson, any update? Is the issue fixed?
            Helpful? Donate. Thanks!
            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!
                Fast VPS Host for vBulletin: A2 Hosting & IONOS

                Comment

                Latest Topics

                Collapse

                Working...
                X