Closed sthomp closed 8 years ago
You probably need to provide the output of the cloud sql proxy for someone to help out.
Instead of "nohup ./cloud_sql_proxy -dir=/cloudsql --instances=my-project:us-central1:my-sql-instance=tcp:3307 &"
Run "nohup ./cloud_sql_proxy -dir=/cloudsql --instances=my-project:us-central1:my-sql-instance=tcp:3307 &> /some-path-to-save-the-log.txt &"
Thanks Ill give that a try. It seems to be related to the number of connections. If I lower my connection pool things seem to be more stable:
create_engine(...., poolclass=QueuePool, pool_size=1)
Thanks for the bug report!
It would be very helpful for debugging's sake to grab the logs. Note, though, that logs are printed out on stderr, so you'll have to do something more like this:
nohup ./cloud_sql_proxy -dir=/cloudsql --instances=my-project:us-central1:my-sql-instance=tcp:3307 2> /some-path-to-save-the-log.txt &
I tried to reproduce this issue and Im not seeing the problem right now. Ill keep my initialization script as you mentioned so that Ill be capturing log output. Next time the issue arises hopefully Ill have a log to report. Feel free to close this issue for now.
Definitely reopen the issue if you notice it happening again.
Im trying to connect to cloud sql from a compute engine instance in my python application. Im running the proxy like this:
I can successfully connect using the MySql client:
I can also connect from a python repl:
But, when I run this same code from my application I'll get Network Unreachable errors:
When I ssh back to the box and check the running processes the Cloud SQL proxy is no longer running.
My application is a script so its doing a lot of SQL work so maybe its overloading the proxy? How can I figure out the issue?