Error while upgrading MariaDB
(XID pg2qxw) The system failed to lock (LOCK_EX, LOCK_NB) the file "/var/cpanel/cpanel.config" because of an error: Cannot allocate memory
Obtained version information from system.
I was upgrading MariaDB and I got this critical error and now everything stopped working.
Any thoughts? Thank you
-
I would expect that by now you have probably tried restarting the system by now, however if the MariaDB service is not loading your sites are probably stil failing to load. Let's focus on the immediate issue of getting your sites back up first and then look towards finding out what happened to prevent the failed upgrade next time. That said, can you try the following command: service mysql restart
If that continues to fail, here's how we can try and see what is preventing it from starting most immediately. Run this command:ls -alh /var/lib/mysql | grep 'err'
Once that finishes you should see the name of the mysql error log file. Take that file name and use it with the path /var/lib/mysql in the next command. Try this to see what the errors have been (last ones are most recent).grep -i 'error' /var/lib/mysql/replace.with.your.file.err
Here you are looking for the error with "Aborting" in the lines following close by. Please post the output of that last command.0 -
If still not working, try to check mysql from scripts: /scripts/check_mysql 0 -
I would expect that by now you have probably tried restarting the system by now, however if the MariaDB service is not loading your sites are probably stil failing to load. Let's focus on the immediate issue of getting your sites back up first and then look towards finding out what happened to prevent the failed upgrade next time. That said, can you try the following command:
service mysql restart
If that continues to fail, here's how we can try and see what is preventing it from starting most immediately. Run this command:ls -alh /var/lib/mysql | grep 'err'
Once that finishes you should see the name of the mysql error log file. Take that file name and use it with the path /var/lib/mysql in the next command. Try this to see what the errors have been (last ones are most recent).grep -i 'error' /var/lib/mysql/replace.with.your.file.err
Here you are looking for the error with "Aborting" in the lines following close by. Please post the output of that last command.
Thank you for your reply. Yes I tried to restart system. I had someone to try some commands and he actually fixed half of it. But there"s a problem that"s still going, the same first problem but all websites are working. Im getting error: API failure: (XID e4wsg6) The system failed to lock (LOCK_EX, LOCK_NB) the file "/var/cpanel/cpanel.config" because of an error: Cannot allocate memory On whmcs also.0 -
Check /etc/my.cnf and set it back to default, also look into upgrading your machine memory. You can see available ram typing: free -m 0 -
Check /etc/my.cnf and set it back to default, also look into upgrading your machine memory. You can see available ram typing: free -m
How do I set my.cnf back to default? I tried to read file:# This group is read both both by the client and the server # use it for options that affect everything # [client-server] # # include all files from the config directory # !includedir /etc/my.cnf.d [mysqld] max_allowed_packet=268435456 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/my.cnf" 13L, 240C # # This group is read both both by the client and the server # use it for options that affect everything # [client-server] # # include all files from the config directory # !includedir /etc/my.cnf.d [mysqld] max_allowed_packet=268435456 ~ ~ ~ ~ ~ ~ ~ ~
And got this. Also, For ram: free -m total used free shared buff/cache available Mem: 4096 451 2031 1 1612 3521 Swap: 4096 1 40940 -
Hello @RealMafia, I see that support ticket number 11137321 is opened to investigate this issue. Here's the most recent response from one of our Technical Analysts: [QUOTE] I am still showing that your server is unable to lock any files as it reports ENOMEM when attempting to lock a file: ===== # flock -s /tmp/-c ls flock: /tmp/-c: Cannot allocate memory ===== It is possible that the parent server that your virtuozzo instance is having resource issues that are not reflected within your instance. At this time, I recommend reaching out to your hosting provider (or whoever maintains the parent server that your instance is hosted on) in order to have them investigate this issue further on the parent server.
Please feel free to respond to the support ticket with any additional questions. I'll monitor the ticket and update this thread with the final outcome once it's closed. Thanks!0 -
Looks like the problem has been fixed when Ram has been upgraded to 8GB. Thanks everyone 0 -
Hello, I'm glad to see the issue was solved. Thanks for sharing the outcome. 0
Please sign in to leave a comment.
Comments
8 comments