• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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