I have an auto-scalable group of google compute engine vms which are configured to connect with second generation cloudsql database instance on the google cloud platform.
I tried to simplify the connection by using SQL proxy connection setup from vm boot up through startup-scripting so that I could avoid adding and removing instances' external ip addresses on instance creation or deletion. Following the instance's daemon.log everything seems to be ok regarding vm to cloudsql connection but on reaching the instance vm via external http it takes an unexpectedly long time to load the index.php and then prints on the screen
Error:sqlstate[hy000][2002] connection timed out.