Upgrade to 1.8.4 - SQLSTATE[HY000]: General error: 1018

After upgrading to 1.8.4 I started to receive some errors. I found this thread 301 Moved Permanently and updated the two files as suggested. However now I’m getting these errors;

SQLSTATE[HY000]: General error: 1018 Can’t read dir of ‘./xxxxxxx_piwik/’ (errno: 24)

Backtrace:
#0 /home/xxxxxxxx/public_html/piwik/libs/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/xxxxxxxx/public_html/piwik/libs/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/xxxxxxxx/public_html/piwik/libs/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(‘SHOW TABLES LIK…’, Array)
#3 /home/xxxxxxxx/public_html/piwik/core/Db/Adapter/Pdo/Mysql.php(220): Zend_Db_Adapter_Pdo_Abstract->query(‘SHOW TABLES LIK…’, Array)
#4 /home/xxxxxxxx/public_html/piwik/libs/Zend/Db/Adapter/Abstract.php(793): Piwik_Db_Adapter_Pdo_Mysql->query(‘SHOW TABLES LIK…’, Array)
#5 /home/xxxxxxxx/public_html/piwik/core/Db/Schema/Myisam.php(444): Zend_Db_Adapter_Abstract->fetchCol(‘SHOW TABLES LIK…’)
#6 /home/xxxxxxxx/public_html/piwik/core/Db/Schema.php(261): Piwik_Db_Schema_Myisam->getTablesInstalled(false)
#7 /home/xxxxxxxx/public_html/piwik/core/Piwik.php(2357): Piwik_Db_Schema->getTablesInstalled(false)
#8 /home/xxxxxxxx/public_html/piwik/core/TablePartitioning.php(67): Piwik::getTablesInstalled(false)
#9 /home/xxxxxxxx/public_html/piwik/core/TablePartitioning.php(60): Piwik_TablePartitioning->checkTableExists()
#10 /home/xxxxxxxx/public_html/piwik/core/TablePartitioning.php(40): Piwik_TablePartitioning->getTableName()
#11 /home/xxxxxxxx/public_html/piwik/core/ArchiveProcessing.php(378): Piwik_TablePartitioning->setTimestamp(1347840000)
#12 /home/xxxxxxxx/public_html/piwik/core/Archive/Array/IndexedBySite.php(281): Piwik_ArchiveProcessing::makeNumericArchiveTable(Object(Piwik_Period_Day))
#13 /home/xxxxxxxx/public_html/piwik/core/Archive/Array/IndexedBySite.php(249): Piwik_Archive_Array_IndexedBySite->getNumericTableName()
#14 /home/xxxxxxxx/public_html/piwik/core/Archive/Array/IndexedBySite.php(135): Piwik_Archive_Array_IndexedBySite->getArchiveIdsWithoutLaunching(Array)
#15 /home/xxxxxxxx/public_html/piwik/core/Archive/Array/IndexedBySite.php(108): Piwik_Archive_Array_IndexedBySite->loadValuesFromDB(Array)
#16 /home/xxxxxxxx/public_html/piwik/core/Archive/Array/IndexedBySite.php(73): Piwik_Archive_Array_IndexedBySite->getValues(Array)
#17 /home/xxxxxxxx/public_html/piwik/plugins/MultiSites/API.php(192): Piwik_Archive_Array_IndexedBySite->getDataTableFromNumeric(Array)
#18 /home/xxxxxxxx/public_html/piwik/plugins/MultiSites/API.php(112): Piwik_MultiSites_API->buildDataTable(‘all’, ‘day’, ‘2012-09-17’, false, false, false)
#19 /home/xxxxxxxx/public_html/piwik/plugins/MultiSites/Controller.php(65): Piwik_MultiSites_API->getAll(‘day’, ‘2012-09-17’, false)
#20 /home/xxxxxxxx/public_html/piwik/plugins/MultiSites/Controller.php(37): Piwik_MultiSites_Controller->getSitesInfo(Object(Piwik_View))
#21 [internal function]: Piwik_MultiSites_Controller->index()
#22 /home/xxxxxxxx/public_html/piwik/core/FrontController.php(138): call_user_func_array(Array, Array)
#23 /home/xxxxxxxx/public_html/piwik/index.php(53): Piwik_FrontController->dispatch()
#24 {main}

I’ve obfuscated the username with xxxxxxxx

I tried downloading and overwriting the installation with the latest 1.8.4 version, however the error still remains.
Looks like an SQL problem.

It’s more a Mysql server configuration issue.

see some tips at: python - mysql error : ERROR 1018 (HY000): Can't read dir of '.' (errno: 13) - Stack Overflow

Maybe your web hosting or sysadmin can help fix the issue? please report here the fix when you find it. Thanks!!

Yes Matt, it was an Mysql error.

Mysql had an issue with too many open files

The initial fix was to set “open-files-limit = 2048” in /etc/my.cnf and restart mysql

However now I’m seeing

SQLSTATE[HY000]: General error: 23 Out of resources when opening file ‘/tmp/#sql_b0c2_0.MYD’ (Errcode: 24)

Which is caused when the open files limit is reached ? So I need to play around with that.

I increased limits to 3072 and all seems to be working now.

good to hear, thanks for the follow up