PDO :: __ construct (): error sending 108 bytes with errno = 32 Broken pipe

When I enter my mysql command line, I can no longer access any PHP application requiring a database connection. It happens every time. Steps to cause the problem on my localhost:

Command line: mysql -u root (no password for localhost) mysql> 

I do nothing and do nothing. I load any page that requires connecting to the database using root:

 PDO::__construct(): send of 108 bytes failed with errno=32 Broken pipe 

If I exit mysql, the pages return, but another problem occurs when trying to load two pages at the same time (in browser tabs), this will cause one of them to break before the page loads, and then I can update

 My.cnf: sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES wait_timeout=5000 max_allowed_packet=100m max_user_connections=1000 
+6
source share
1 answer

Configure wait_timeout in the MySQL my.cnf configuration file:

wait_timeout=3600

This configuration file is located in /etc/mysql/my.cnf (Ubuntu / Debian) and /usr/local/mysql/my.cnf (OSX) and /location of server bin folder/mysql/my.cnf for windows.

Reboot the MySQL server and see if it should work.

0
source

Source: https://habr.com/ru/post/984051/


All Articles