-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
General error: 2014 Cannot execute queries while other unbuffered queries are active #6745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Found the solution: doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
options:
1002: "SET NAMES utf8" #initial query
1000: true #PDO::MYSQL_ATTR_USE_BUFFERED_QUERY Now it works well. |
+1 |
1 similar comment
+1 |
not work for me |
@health901 Which driver do you use ? |
Close your sql cursor like here: $stmt = $this->container->get('doctrine.orm.entity_manager')->getConnection()->prepare($content); Then, you can use your conection to do more queries. |
Illuminate\Database\QueryExceptionSQLSTATE[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::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: update chats set status ='2' WHERE sender_id = 6 and receiver_id = 15 and status = 1 ) I need help on this error |
@Otech2018: thank you for reaching out. This tracker is meant for tracking bugs and feature requests. If you are looking for support, you'll get faster responses by using one of our official support channels:
See https://symfony.com/support for more support options. |
This error is always happens while there were two executions at a same time for example:
Solution: Second execution is no needed, remove second one, the first execution is already executed.
I hope this Solution is helpful |
Greetings!
I have faced the following problem: after my shared hosting provider upgraded PHP, I started to receive the following error:
Is there a way to set the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY through the standard Symfony 2 configuration?
The text was updated successfully, but these errors were encountered: