Skip to main content

mysql hangs - Optimization required?

Comments

14 comments

  • cPRex Jurassic Moderator
    Hey there! The best way to check the problem would be to run the "mysqladmin proc status" command in real-time while the issue is happening. This will show what queries the MySQL server is handling and may point you in the right direction. If nothing is being written to the error_log, trying to watch the issue in real-time is your best bet toward a resolution.
    0
  • harmonypersechino5348
    Hey there! The best way to check the problem would be to run the "mysqladmin proc status" command in real-time while the issue is happening. This will show what queries the MySQL server is handling and may point you in the right direction. If nothing is being written to the error_log, trying to watch the issue in real-time is your best bet toward a resolution.

    Not been able to do that yet as it's not come back long enough. The only thing I can see constantly running with not much else is event_scheduler should I consider disabling? Read some other users have issues with event_scheduler eating up CPU
    0
  • cPRex Jurassic Moderator
    I suppose it's possible, but I'd hesitate to officially recommend anything with what little information we have. Since you have root access to the machine, you're always welcome to submit a ticket to our team to have us take a look directly.
    0
  • cybershubham
    Not been able to do that yet as it's not come back long enough. The only thing I can see constantly running with not much else is event_scheduler should I consider disabling? Read some other users have issues with event_scheduler eating up CPU

    Hey, did you manage to solve it? I am facing a similar problem in MySQL 8.0.29 ?
    0
  • cPRex Jurassic Moderator
    @cybershubham - it's very unlikely that one person's fix for a load or performance issue will resolve another. It's best to examine the system with the "mysqladmin proc status" command while the issue is happening so you can see what MySQL is doing in real-time, or check the MySQL error logs for more details.
    0
  • ejsolutions
    Useful tools if used carefully and backups of my.cnf taken: mysqltuner.pl & tuning-primer.sh They will give some conflicting information that you'll need to make a judgement on. Go in small steps. (max_connections=400 <--that's a lot of committed memory ;) )
    0
  • cybershubham
    @cybershubham - it's very unlikely that one person's fix for a load or performance issue will resolve another. It's best to examine the system with the "mysqladmin proc status" command while the issue is happening so you can see what MySQL is doing in real-time, or check the MySQL error logs for more details.

    Yeah well, I regret using MySQL 8 now. mysqladmin proc status had nothing much except event_scheduler. No errors in the logs. MySQL just degrades in performance in 8-10 hours. Litespeed starts giving 503 on websites. After a restart of MySQL, everything goes back to normal. CPU load average is not even 10%. Memory usage is normal. Everything was normal until 2-3 days ago. mysqltuner.pl doesn't say anything useful either.
    0
  • cPRex Jurassic Moderator
    Hmmmmmm, I haven't heard of similar behavior like that. Could you create a ticket with our support team so we can check the system directly?
    0
  • cybershubham
    Hmmmmmm, I haven't heard of similar behavior like that. Could you create a ticket with our support team so we can check the system directly?

    Hi, I have created a ticket. Id #94459054
    0
  • cPRex Jurassic Moderator
    Thanks for that - I'm following along with that ticket on my end now.
    0
  • harmonypersechino5348
    Hi, I have created a ticket. Id #94459054

    No I did not find a fix. Memory usage appears to be low from what I can tell yet it's swapping out memory even with swappiness set to 0 Have you had any luck in your ticket?
    0
  • cybershubham
    No I did not find a fix. Memory usage appears to be low from what I can tell yet it's swapping out memory even with swappiness set to 0 Have you had any luck in your ticket?

    Unfortunately, no. First, it happened every 6 hours, now it happens every 18 hours. Clients are angry. cPanel support couldn't help me either. Now I have to admit, MySQL 8 sucks. Deploying a new server with MariaDB 10.3 and moving the accounts lastly.
    0
  • harmonypersechino5348
    Any update to this maybe from cPanel support? @cPRex mysql threads just eventually build up and mysql hangs. A mysql restart instantly fixes it. Uptime: 103689 Threads: 70 Questions: 86589599 Slow queries: 0 Opens: 2406161 Flush tables: 3 Open tables: 4000 Queries per second avg: 835.089
    After restart Uptime: 807 Threads: 8 Questions: 780539 Slow queries: 0 Opens: 16654 Flush tables: 3 Open tables: 3998 Queries per second avg: 967.210
    The time field never goes above 60 the only thing I can see is the "State" from mysqladmin proc status
    seems to have a lot of "closing tables" and "starting" vs after a restart.
    0
  • cPRex Jurassic Moderator
    I don't have any updates on my end, since I don't think this is an issue with the services on the machine, but a particular issue with the system. Were you able to open a ticket to have our team check this out?
    0

Please sign in to leave a comment.