Monday, November 18, 2013

Re: Native MySQL connection using internal IP

Hi there,
The 15 minute window may indicate that your instance has been brought down due to inactivity. Is your instance on a per use pricing plan (https://developers.google.com/cloud-sql/pricing#per_use)? If that's the case, that'd explain why the server has gone away.


On Sun, Nov 17, 2013 at 5:50 AM, Jakub Głuszecki <jakub.gluszecki@gmail.com> wrote:
Using mysql client it looks like this: (connecting from GCE vm instance)

mysql> select count(*) from leads;
+----------+
| count(*) |
+----------+
|        2 |
+----------+
1 row in set (0.00 sec)

[ ... now take a 15 mins break ... ]

mysql> select count(*) from leads;

[ ... it hangs and after few minutes: ]

ERROR 2013 (HY000): Lost connection to MySQL server during query

[ ... another try, right after error msg appeared ]

mysql> select count(*) from leads;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    8
Current database: landingpage

+----------+
| count(*) |
+----------+
|        2 |
+----------+
1 row in set (0.10 sec)


W dniu niedziela, 17 listopada 2013 13:23:41 UTC+1 użytkownik Jakub Głuszecki napisał:
Thanks for your answer Razvan,
I'm aware of SSL support, I agree that it improves security, however I have some other concerns about connecting using external IP - I'm afraid of network/firewall issues. Is there any possibility that some firewall (on the Google side) interferes with mysql connections between GCE and CloudSql instances? I have some issues with unused connenctions. Everything works fine if a connection is busy, but few minutes of inactivity seems to break it. I'm going to dig deeper, but maybe You can provide me with some hints.

W dniu niedziela, 17 listopada 2013 04:22:59 UTC+1 użytkownik Razvan Musaloiu-E. napisał:
Currently we only have support via externals IPs. Note that the SSL support [1] provides a way to secure the connections to Clouud SQL from both GCE and Internet.


-- Razvan ME


On Sat, Nov 16, 2013 at 6:02 AM, Jakub Głuszecki <jakub.g...@gmail.com> wrote:
Hi folks!

I have a Ruby no Rails application running on Compute Engine VM's.
I'm excited about a new possibility to use native mysql connections to CloudSql instances,
however I'm not happy to connect using an external IP.
Is there any possibility now, or planned in the near future, to connect to CloudSql instance using some sort of internal IP, just like two Compute Engine Vm's can connect to each other using internal subnet?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3088169e-b8d9-46bf-9830-85030b429046%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/94128185-6a4a-4ffa-aff8-f6e23a5470de%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAJY7PsCeOU9n2Rs-DG%2BBy1wvht1a%2BgGjhrsm25w57B0Z-9%3DFxg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment