Announcement

Collapse
No announcement yet.

Database with high CPU

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts
    glennrocksvb
    Founder/Coder

  • glennrocksvb
    replied
    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.

    Leave a comment:

  • ChristianAlfredsson
    Junior Member

  • ChristianAlfredsson
    replied
    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.

    Leave a comment:

  • glennrocksvb
    Founder/Coder

  • glennrocksvb
    replied
    ChristianAlfredsson
    Junior Member
    ChristianAlfredsson, any update? Is the issue fixed?

    Leave a comment:

  • glennrocksvb
    Founder/Coder

  • glennrocksvb
    replied
    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.

    Leave a comment:

  • glennrocksvb
    Founder/Coder

  • glennrocksvb
    replied
    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

    Leave a comment:

  • ChristianAlfredsson
    Junior Member

  • ChristianAlfredsson
    replied
    Any thoughts on the mysql-query running so often?

    Leave a comment:

  • glennrocksvb
    Founder/Coder

  • glennrocksvb
    replied
    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.

    Leave a comment:

  • ChristianAlfredsson
    Junior Member

  • ChristianAlfredsson
    started a topic Database with high CPU

    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?

Latest Topics

Collapse

Working...
X