Question

I'm running:

CentOS 5.5 x86
cPanels-11.26.20 RELEASE
Apache 2.2.16
PHP 5.3.3 "--with-mysqli=mysqlnd"
MySQL 5.1.51

When I connect to the database, I use "p:localhost" for the hostname to establish a persistent connection.

Yesterday I was using my app no problem before leaving the office. Today I tried using it again and it returned an error:

mysqli_connect() send of 46 bytes failed with errno=32 Broken pipe

If I remove the "p:" before the hostname, the issue is resolved. Prepend the "p:" again and the error reappears. However restarting Apache resolves the issue without the need to edit the hostname. If I run PHP CLI scripts w/ p: in the hostname, they work fine without an error.

Is there a problem with Apache? Does anyone know what could be causing this?

Thanks in advance.

Was it helpful?

Solution

Probably is because of low memory? You had to many persistent connections how took all the RAM. Persistent connections are closed very late so probably new connections are made each time

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top