Support » Fixing WordPress » Very long time of post update (wp-admin/post.php)

  • Hello,
    since some time post updating time is very long (even 50 seconds (normal time before was 1-2 seconds)). I’ve deactivated all plugins – it didn’t change anything. I’ve reinstalled WordPress via “re-install now” button – didn’t work. I’ve checked it using Query Monitor plugin, but it doesn’t monitor POST method (only GET).
    I have 19500 posts and 12000 tags (I’ve started to delete all tags – I don’t really need them).
    Loading time of GET wp-admin/post.php?post=X&action=edit&message=1 is normal – 1-2 seconds, sometimes more. PHP version is 7.3 and WordPress 5.3.2.
    Sometimes wp-admin/post.php returns Internal Server Error.
    I’m using default WordPress theme – twenty sixteen. I’m updating posts very often – like once per 2 seconds using application (bot).

    Can you tell me how I can check what is the reason of that?
    Cheers

    • This topic was modified 1 week, 1 day ago by r3crac.
    • This topic was modified 1 week, 1 day ago by r3crac.
    • This topic was modified 1 week, 1 day ago by r3crac.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • In public_html/error_log file there’re a lot of errors like:
    WordPress database error User 'x' has exceeded the 'max_questions' resource (current value: 1) for query SELECT x_posts (...)

    I’ve contacted with hosting support and they said that they have set max_questions to unlimited.

    There are also these errors:

    [24-Mar-2020 08:15:02 UTC] PHP Warning:  mysqli_query(): Error reading result set's header in /home4/x/public_html/wp-includes/wp-db.php on line 2030
    [24-Mar-2020 08:15:02 UTC] PHP Warning:  mysqli_query(): MySQL server has gone away in /home4/x/public_html/wp-includes/wp-db.php on line 2030
    • This reply was modified 1 week, 1 day ago by r3crac.
    • This reply was modified 1 week, 1 day ago by r3crac.
    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    This sounds like a config or capacity problem with your MySQL server that would have to be addressed by your host. First, however, try (1) removing unncessary content from your database with a plugin like https://wordpress.org/plugins/wp-sweep/, then optimize the database via PHPMYADMIN following https://www.a2hosting.com/kb/cpanel/cpanel-database-features/optimizing-and-repairing-mysql-databases-with-phpmyadmin

    1. WP Sweep didn’t change anything (I’ve selected everything, even database sweep).
    2. PHPMyAdmin throws “lost connection to mysql server during query” after clicking “Optimize table” (it took about 1 minute to throw this error) on all selected tables (there are 42 tables. The biggest tables:
    – InnoDB named 75b_posts (177.2 MB),
    – MyISAM 75b_yoast_seo_links (14.8 MB),
    – MyISAM 75b_postmeta (11.5 MB) ),
    – MyISAM 75b_term_relationships (9.2 MB).

    This is how it looks like (wp-admin/post.php file). Black color is POST and Blue GET. Sometimes Internal Server Error appears on both GET and POST.
    https://i.imgur.com/4OcASEr.png

    • This reply was modified 1 week, 1 day ago by r3crac.
    • This reply was modified 1 week, 1 day ago by r3crac.
    • This reply was modified 1 week, 1 day ago by r3crac.
    • This reply was modified 1 week, 1 day ago by r3crac.
    • This reply was modified 1 week, 1 day ago by r3crac.
    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Item number 2 suggests that your MySQL server is the issue, not WordPress. Please contact your host.

    I’ve already contacted with the host (BlueHost). They can’t find any issues.

    I think I found why it’s so slow. I’ve had too many tags (14k). I’ve deleted 12k and now it’s a way faster (post.php takes less than 5 seconds, sometimes 2 seconds). I will delete all of them (using WP Sweep).
    Do you know plugins or manual ways of cleaning useless post meta, terms etc.? I don’t think WP Sweep is cleaning everything. I found that I can delete “_edit_lock”, “_edit_last” from database (I did it – 38k records!). I’ve disabled revisions, auto save. What else can I do?

    • This reply was modified 5 days, 9 hours ago by r3crac.
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.