Skip to content
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

Incompatible with Google Cloud SQL proxy socket connections #49

Closed
ahmed-sigmalux opened this issue Jan 4, 2018 · 3 comments
Closed

Comments

@ahmed-sigmalux
Copy link

Google recommends using Google Cloud SQL proxy, which creates a local UNIX socket, to connect to its managed SQL service. These sockets are generated in the format:

project:region:instance

So you end up with a local file like:

/run/cloud_sql_proxy/my-project:us-central1:my-instance

Using this local file in db-config.php like:

'host' => 'localhost:/run/cloud_sql_proxy/my-project:us-central1:my-instance

Generates thousands of global__r errors in the debug.log and basically breaks everything. I think the colons in the local file aren't being escaped / interpreted correctly and that makes the database unreachable.

@takotakot
Copy link
Contributor

Does this problem happen WITHOUT this plugin?

@zardoz-bzar
Copy link

zardoz-bzar commented Jun 28, 2019

Workaround, make a symlink to their socket.

You should not use Google Cloud SQL for Wordpress. Or ... just about anything. It is a low effort feature made to match AWS on a feature matrix so sales people can say "we have that too".

You are not going to get UDS throughput through a Cloud SQL proxy socket that is actually an TCP/SSL. Using UDS means you have a default concurrency of 128 connections as well, even though it's TCP under the hood. Better tune up that net.core.somaxconn!

TL;DR: leave this broken to discourage people from using an awful product from a company that should know better.

Ref: GoogleCloudPlatform/cloud-sql-proxy#87

@JJJ
Copy link
Collaborator

JJJ commented Oct 2, 2019

I'm willing to bet (without looking) that the colons are being misinterpreted as ports.

@JJJ JJJ closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants