PHP-FPM - Default Issue with Ioncube/Wordpress

Discussion in 'Installation/Configuration' started by mcfreder, Aug 11, 2018.

  1. mcfreder

    mcfreder New Member

    You were right till! It is mysql! Look what I found:
    %CPU PID USER COMMAND
    97.0 45648 mysql /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --p lugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.lo g --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --p ort=3306

    It is using way too high resources for some reason! is there a way to fix it?
     
  2. mcfreder

    mcfreder New Member

    It is not too large, just 3 GB.
    Yes, redis is not installed and I have disabled the plugin that uses it on both websites. Please read my post above, I think i found the culprit.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

  4. mcfreder

    mcfreder New Member

    I have checked the logs and theses are errors from the website that actually work:
    [ERROR] Cannot find or open table 0Ao/o7PkT0dV_pollsa from
    the internal data dictionary of InnoDB though the .frm file for the
    table exists. Maybe you have deleted and recreated InnoDB data
    files but have forgotten to delete the corresponding .frm files
    of InnoDB tables, or you have moved .frm files to another database?
    or, the table contains indexes that this version of the engine
    doesn't support.
    See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
    how you can resolve the problem.

    many of these errors only belong to the workding website, nothing from the slow website sadly.
     
  5. mcfreder

    mcfreder New Member

  6. mcfreder

    mcfreder New Member

    We have made a little progress. The cpu usage is 92% instead of 97%.
    Im running mysql tuner to see what other recommendations
     
  7. mcfreder

    mcfreder New Member

    I have been trying to make my website work for an entire week now so I am really confused what's with the 100% mysql. You may not believe it, but I reinstalled my system and plesk 17 as the panel. It took me 2 mins to install the panel and 5 min to manually upload my backup files and database, And the website worked instantly.

    I didn't even install ioncube or configure a single parameter. Everything installed with Plesk automatically. I have no idea how that worked out so much better and fast. I'm currently using FPM-PHP + Apache just like what i had in ISPConfig.

    Anyway I will look into ISPConfig through my virtual machine to find out the culprit. Once I do I will share it here.

    Thank you for the help and feedback!
     
  8. mcfreder

    mcfreder New Member

    As I promised, I have been looking into it for weeks now and managed to fix it. And I can confirm that ISPConfig works great!!

    What was causing a high CPU usage of MySQL?

    I have been using WordPress on my website since 2008 so mysql database structure was really old!! All my tables used MyISAM engine instead InnoDB, and most of my tables were missing primary keys which resulted into some endless querying hence the 200% cpu usage.

    I was first unable to use any plugin to export my posts or do any backup whatsoever so What I did to solve the problem was, I downloaded the latest wordpress version, created a fresh installation of WordPress which means a fresh database. Then I went to my old database and exported table by table as .sql file to make it easier to edit through my notepad c++, then I edited each .sql file and only kept "insert into" elements while deleting everything else. Finally, I imported all those edited .sql files into my fresh database and double checked all the tables to contain primary keys if a table doesn't have a primary key I would select the table then go to the structure tab; set the first field as primary key. Instantly my website worked and cpu usage of mysql is now as low as 10% or even less.

    The point here is that creating a fresh database from scratch and importing back your website data into it would fix the problem without any doubt especially if your website is old.

    I hope this helps someone.
     

Share This Page