• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Strange problem with SQLSTATE

DarkKikies

Basic Pleskian
Hello,
Recently I happened to receive numerous emails from my plesk server with this content:

Subject:
Cron <root@*****> /opt/psa/admin/bin/php -c '/opt/psa/admin/conf/php.ini' -dauto_prepend_file=sdk.php '/opt/psa/admin/plib/modules/dropbox-backup/scripts/plesk-task-manager.php'


[2017-02-01 08:24:01] ERR [panel] SQLSTATE[HY000] [2002] Cannot allocate memory:
0: /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:144
Zend_Db_Adapter_Pdo_Abstract->_connect()
1: /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Mysql.php:111
Zend_Db_Adapter_Pdo_Mysql->_connect()
2: /opt/psa/admin/externals/Zend/Db/Adapter/Abstract.php:460
Zend_Db_Adapter_Abstract->query(string 'SET sql_mode = ''', array)
3: /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:238
Zend_Db_Adapter_Pdo_Abstract->query(string 'SET sql_mode = ''', array)
4: /opt/psa/admin/plib/Db/Adapter/Pdo/Mysql.php:30
Db_Adapter_Pdo_Mysql->query(string 'SET sql_mode = ''')
5: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:90
CommonPanel_Application_Abstract::initDbAdapter()
6: /opt/psa/admin/plib/Session/Helper.php:165
Plesk\Session\Helper::initStorage()
7: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:36
CommonPanel_Application_Abstract->run()
8: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:18
CommonPanel_Application_Abstract::init()
9: /opt/psa/admin/plib/pm/Bootstrap.php:16
pm_Bootstrap::init()
10: /opt/psa/admin/plib/sdk.php:12
ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] Cannot allocate memory (Abstract.php:144)
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Cannot allocate memory' in /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:129
Stack trace:
#0 /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:dbname=ps...', 'admin', '$AES-128-CBC$Fl...', Array)
#1 /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#2 /opt/psa/admin/externals/Zend/Db/Adapter/Abstract.php(460): Zend_Db_Adapter_Pdo_Mysql->_connect()
#3 /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('select param, v...', Array)
#4 /opt/psa/admin/plib/Db/Adapter/Pdo/Mysql.php(30): Zend_Db_Adapter_Pdo_Abstract->query('select param, v...', Array)
#5 /opt/psa/admin/plib/db.php(36): Db_Adapter_Pdo_Mysql->query('select param, v...')
#6 /opt/psa/admin/plib/db.php(212): db_query('select param, v...', false)
#7 /opt/psa/admin/plib/Plesk/Mode.php(423): get_param('disable_provisi...')
#8 /opt/psa/admin/pl in /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php on line 144

can not figure out how to solve. Anyway the vps is online and running all domains.

happen occur randomly, I get emails also 20 below..
 
Cannot allocate memory

Looks like lack of resources for your VPS.
Ask your server administrator to increase RAM for your VPS at least.
 
it's strange, because it happens only on occasion. Usually, having too many connections Ram remains at 30/40%.
It is possible that depends on the Dropbox's backup?


Thansk for the reply ;)
 
There are may be lack of different types of memory, In case of Virtuozzo VPS, for example, it may be privvmpages, shmpages, oomguarpages, etc.
If you have Virtuozzo VPS, you can check number of failcnt for VPS resources in output of command

# cat /proc/user_beancounters
 
Ask administrator of your Virtuozzo node to increase this parameter for your VPS.
 
Yes exactly.
resource held maxheld barrier limit failcnt
numothersock 171 500 500 500 66301


EDIT:
I read that many mail services except postfix not use this parameter.

And I just use postfix. If I change my mail server, I should fix, right?

EDIT2:
but in the plesk update page I just
postfix (currently in use)
qmail (that I know what is obsolete)
and MSMTP (relay only)
 
Last edited:
Back
Top