Your software
My Mautic version is: 4.4.11
My PHP version is: 8.0.30
My Database type and version is: Ver 15.1 Distrib 10.6.16-MariaDB
Your problem
My problem is: I get the following error while running a commandL:
user@mautic:~$ sudo -u www-data php /srv/mautic/bin/console doctrine:query:sql "SHOW tables"
int(0)
In AbstractMySQLDriver.php line 128:
An exception occurred while executing 'SELECT c0_.id AS id_0, c0_.name AS name_1, c0_.error_message AS error_message_2, c0_.execution_time AS execution_time_3, c0_.date_started AS date_started_4, c0_.date_ended AS date_ended_5, c0_.details AS details_6, c0_.command_has
h AS command_hash_7 FROM command_log c0_ WHERE c0_.name = ? AND c0_.command_hash = ? ORDER BY c0_.date_started DESC LIMIT 1' with params ["doctrine:query:sql", "2e5dd9cbd37e1b4c991ec8547f935431"]:
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYS
QL_ATTR_USE_BUFFERED_QUERY attribute.
In Exception.php line 18:
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYS
QL_ATTR_USE_BUFFERED_QUERY attribute.
In PDOStatement.php line 117:
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYS
QL_ATTR_USE_BUFFERED_QUERY attribute.
doctrine:query:sql [--connection CONNECTION] [--depth DEPTH] [--force-fetch] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> <sql>
fuser@mautic:~$
Steps I have tried to fix the problem:
From what I understand this seems to be a PHP problem. I changed the mysqlnd.net_cmd_buffer_size
default value to be 16384 on the fpm php.init file, but that didn’t help.