HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

Receiving "General error: 1030 Got error 168 from storage engine"

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
168got1030errorenginestoragegeneralreceivingfrom

Problem

I am not sure if this is the right Stack Exchange to post to or not (StackOverflow figured it belonged elsewhere, so maybe it will do better here?) but I keep receiving this MySQL error when I try to install Magento2 on a VPS (Centos6, MySQL 5.7.11):


SQLSTATE[HY000]: General error: 1030 Got error 168 from storage engine

I have searched around and have found that it has to do with InnoDB not being able to write to its data files. I have also found that people who have had the same 1030 error mostly receive a -1 or 28 error and both are easily identified as 1) innodb_force_recovery set to greater than 0 (I don't have this set in my my.cnf file), and 2) not enough disk space (I have 5GB left on the drive mysql is on).

I should note that it installs anywhere from 136-162 tables fine before it stops and errors out. After that I try to add the last table it errored on manually, it then exhibits symptoms similar to this issue:

Can't create table, but table doesn't exist

The MySQL manual says:

"Check the %d value to see what the OS error means. For example, 28 indicates that you have run out of disk space."

So my question(s) are:

  • Does anyone know what the 168 code means? -OR-



  • Where to find the list of "%d value" errors so I can hopefully get some idea for what else to try? I have Googled %d value mysql and other versions of these search criteria and don't get back any results of value (that I can decipher anyway)



What I have tried thus far:

  • Adding a line to my fstab to up the storage of my /temp folder to 2GB



  • I have tried to repair tables (which actually was not a good idea, that messed up a bunch of stuff)



  • I tried to run the mysql_upgrade (I recently updated the MySQL install so I could install Magento2 so I was hoping I forgot to do that and that might work)



  • Various other tinkering-type things that probably broke something else I don't know about...



If anyone has any insight on where these %d descriptions are or can po

Solution

[ERROR] InnoDB: Unable to lock ./magento_test2/authorization_rule.ibd error: 37
[ERROR] InnoDB: Error number 37 means 'No locks available'


Check your OS open file limit (for the mysql user) - ulimit -a and open files or maybe file locks for values between 256-512 (160 tables created, each having ibd/frm or frm/myi/myd for possible myisam table means a bit over 300 files) and try to make it higher.

Code Snippets

[ERROR] InnoDB: Unable to lock ./magento_test2/authorization_rule.ibd error: 37
[ERROR] InnoDB: Error number 37 means 'No locks available'

Context

StackExchange Database Administrators Q#138505, answer score: 4

Revisions (0)

No revisions yet.