Friday, February 1, 2013

Re: Astonishing slowness when making a connection

Thanks Ken. I was aware of that 'passivation' style behaviour and had convinced myself that I'd disproved it as the culprit. Alas, I'm less sure now, as having run my test harness I've observed a much shorter latency. 

Thanks again for replying, 
Al

On Thursday, January 31, 2013 5:40:40 PM UTC, Ken Ashcraft wrote:
If you are using a Per Use Plan (https://developers.google.com/cloud-sql/docs/billing#per_use), the system will shut down your instance if it has been idle for more than 15 minutes.  The next connection will cause the instance to spin up.  That typically takes ~8 sec, but 15 sec is not surprising.  If this spin up latency is unacceptable, you can switch to a Package Plan and your instance will only be shut down after 12 hours of inactivity.

Ken

On Thu, Jan 31, 2013 at 12:45 AM, <alan....@paddypower.com> wrote:
Hi All, 

I'm using Spring, JPA and Hibernate to connect to a Google Cloud SQL instance, though my application sits in-house within my company (for reasons I won't bore anybody with) rather than being deployed to the Google cloud platform. Early on, several warning signs led me to believe that this outside-in access is 'barely' supported by Google (e.g. scant mention in the documentation, the fact that the driver for connecting to Google Cloud SQL from outside is not in any JAR available through Maven, etc etc). 

My specific problem is that my application seems to take an inordinate amount of time to connect to the database. If you contrast the timestamps of the two log statements below, you'l note a 15 second latency during connection. Has anybody else encountered similar? Might this be a firewall problem within my own company, or could it be that the databases are simply not technologically built to accept connections from applications not deployed within the same cloud? 

All thoughts/suggestions much appreciated, 

Cheers, 
Al


2013-01-25 09:05:44,742 [com.paddypower.metrics.kanban.report.monthly.OpsReviewEmailer.main()] INFO  org.hibernate.connection.DriverManagerConnectionProvider  - connection properties: {autocommit=true, release_mode=auto}  2013-01-25 09:05:59,962 [com.paddypower.metrics.kanban.report.monthly.OpsReviewEmailer.main()] INFO  org.hibernate.cfg.SettingsFactory  - Database ->         name : MySQL/Google Cloud SQL      version : 5.5.28        major : 5        minor : 5  2013-01-25 09:05:59,962 [com.paddypower.metrics.kanban.report.monthly.OpsReviewEmailer.main()] INFO  org.hibernate.cfg.SettingsFactory  - Driver ->         name : Google Cloud SQL JDBC Driver      version : 1.0        major : 1        minor : 0

--
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.
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment