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
error 32 broken pipe #224
Comments
There might be multiple causes for this:
If this is not a networking issue then the server might send relevant information before shutting down the connection. PyMySQL doesn't always capture that information. I had a situation where my queries were too large. The MySQL server was responding me with the proper error code (#1153) and was then shutting down the connection. PyMySQL wasn't capturing the error code. It just raised |
I switched to mysql connector but the situation did not improve, this time I was getting: (OperationalError) MySQL Connection not available So I guess this is not a pymysql issue and further searching gave me a hint that this might be a SQLAlchemy issue for MySQL databases. I've followed the "optimistic" workaround as described here: http://docs.sqlalchemy.org/en/rel_0_9/core/pooling.html#dealing-with-disconnects I'm not still sure if it's a pymysql issue, I'll update if the workaround works. |
@shaflul To avoid MySQL's wait_timeout, you can use pool_recycle option of |
I have the same problem when using openstack 14 it's not starting instance because of hosts can not be found error and I found this error causes the problem in nova-api.log 2019-01-26 05:01:02.776 17087 ERROR oslo_db.sqlalchemy.engines self._write_bytes(packet) |
mysql --max_allowed_packet=32G !/usr/bin/env python2.7 would solve it ... |
This error is not a bug. This error is caused by various program / configuration / environment issues. Don't use this issue tracker to discuss about this error. It bother me. Use Stackoverflow or other community to avoid bother OSS maintainers. |
Hi,
My app is using PyMySQL for a SQLAlchemy powered application. I'm getting this error quite a lot.
Can you please advise any suggestions?
PyMySQL installed by pip: PyMySQL (0.6.1)
I've been using PyMySQL for a Tornado and Celery app and running in two linux servers, both having the same problems.
Trace:
I've been using supervisor to run a celery program. Following command is used to start the application:
!/bin/bash
NAME="phoenix_celery" # Name of the application
APPDIR=/webapps/phoenix/src # App directory
SOCKFILE=/webapps/phoenix/run/gunicorn.sock # we will communicte using this unix socket
USER=phoenix # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
echo "Starting $NAME as
whoami
"Activate the virtual environment
cd $APPDIR
source ../bin/activate
export PYTHONPATH=$APPDIR:$PYTHONPATH
Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR
exec celery worker --app=scheduling -l info
The text was updated successfully, but these errors were encountered: