Saturday, June 30, 2012

Re: Google Apps Script JDBC Service and Google Cloud SQL

Yeah I saw the presentation of saurabh gupta! I'll checknthat out... any ideas where to find examples?
The thing is that it seems that apps script is never an priority within google and isn't it strange that you can connect just about anything from anywhere but not a proper Google product?

Cheers
Jacob

Em 30/06/2012 02:47, "Geoff Newell" <geoff.newell@appsbroker.com> escreveu:
Hi Jacob. 
Google announced at IO some big changes for Appscript. 

ScriptDB is the key one. You've now got a scalable, searchable nosql style datastore you can use. Much better than using a spreadsheet. 

Agree it makes sense to connect through to CloudSql. Guess it's not a priority for Google at the moment. 

Geoff. 

On 30 Jun 2012, at 00:50, Jacob van den Berg <jacobvdb@lagaroo.com.br> wrote:

So  this does not work with Google Cloud SQL and Google Apps Scripts?

I have to continue using the spreadsheets??

It is the last missing link for Google Apps Script (UI) and Sites to be complete!  

Cheers,
Jacob 


Em sexta-feira, 22 de junho de 2012 11h14min31s UTC-3, SS escreveu:
Ya, y cnt we all just create a FORM/Link to get the MASSIVE VOTES fr this subject & SEND it to Google, so tht they can take ACTION promptly fr this App Engine Wrapper?
Also, I want them to make them Cloud SQL as a free trial on a User Basis, atleast fr a month.

They really have to improve Standards in terms of marketing New Products fr Entreprise!!

--Som

On Fri, Jun 22, 2012 at 9:45 PM, JohnSuper <googleadmin@platoacademy.net> wrote:
Ya, based on previous statements I thing everyone was just sitting back waiting thinking it was being worked on and will be coming down the pipes in a rollout.

Since it is not on the radar I think those, like me, who have just been sitting quietly waiting, need to voice out.   I know that even if there is tons of interest, nothing gets in the pipeline unless the interest is voiced massively. 

It's odd that there is a Google BigQuery connector and access API's for apps script but not for CloudSQL

John


On Friday, June 15, 2012 7:48:48 PM UTC-4, Joe Faith wrote:
Hi John

we don't have plans to release an Apps Script JDBC connector in the near future.

J

On Fri, Jun 15, 2012 at 12:24 PM, JohnSuper <googleadmin@platoacademy.net> wrote:
Any update on Cloud SQL access from Google Apps Script JDBC?

In the mean time has anyone written a App Engine Wrapper that has an example code to post?

I don't want to waste time writing a wrapper if Apps Script JDBC access is coming out in a couple of weeks or something.  But if it going to be a while or not in the immediate future it might be worth the time...

I'm assuming  a wrapper entails an apps script URLFetching an app engine app that takes a SQL statement as an incoming parameter, calls a Google Cloud SQL database and outputs a table of results that the  apps script URL fetch receives as return output into a text?   Or am I confused?

John



On Tuesday, November 29, 2011 9:29:10 AM UTC-5, Saurabh Gupta wrote:
Integrating Cloud SQL with Apps Script is being considered. In the meantime, you can write an App Engine service as a wrapper that exposes Cloud SQL data to your Scripts.

-saurabh



--
Joe Faith | Product Manager | Google Cloud

Re: ResultSet does not have a column ID or (1)

why the resultset not return the column Information

On Saturday, 30 June 2012 12:30:32 UTC+5:30, Shilendra wrote:
I am insert the record with auto incremented ID and one field User_ID update at the time of insert as the base max id in the ID value, at insert is execute and select also but the rs dnt have the column value rs=st.executeQuery("SELECT max(ID) From Person"); int ID1=rs.getInt("ID");so the result set show the ResultSet does not have a column ID why is show?


Statement st=c.createStatement();
      rs
=st.executeQuery("SELECT max(ID)  From Person");
     
int ID1=rs.getInt("ID");
     
System.out.print("ID: " + ID1);


and update commned

String statement1 ="UPDATE Person SET User_ID='HRD'+'"+ID1+"' where ID='"+ID1+"'";
     
PreparedStatement stmt1 = c.prepareStatement(statement1);
      success
= stmt1.executeUpdate();


ResultSet does not have a column ID or (1)

I am insert the record with auto incremented ID and one field User_ID update at the time of insert as the base max id in the ID value, at insert is execute and select also but the rs dnt have the column value rs=st.executeQuery("SELECT max(ID) From Person"); int ID1=rs.getInt("ID");so the result set show the ResultSet does not have a column ID why is show?


Statement st=c.createStatement();
      rs
=st.executeQuery("SELECT max(ID)  From Person");
     
int ID1=rs.getInt("ID");
     
System.out.print("ID: " + ID1);


and update commned

String statement1 ="UPDATE Person SET User_ID='HRD'+'"+ID1+"' where ID='"+ID1+"'";
     
PreparedStatement stmt1 = c.prepareStatement(statement1);
      success
= stmt1.executeUpdate();


Friday, June 29, 2012

Re: Google Apps Script JDBC Service and Google Cloud SQL

Hi Jacob. 
Google announced at IO some big changes for Appscript. 

ScriptDB is the key one. You've now got a scalable, searchable nosql style datastore you can use. Much better than using a spreadsheet. 

Agree it makes sense to connect through to CloudSql. Guess it's not a priority for Google at the moment. 

Geoff. 

On 30 Jun 2012, at 00:50, Jacob van den Berg <jacobvdb@lagaroo.com.br> wrote:

So  this does not work with Google Cloud SQL and Google Apps Scripts?

I have to continue using the spreadsheets??

It is the last missing link for Google Apps Script (UI) and Sites to be complete!  

Cheers,
Jacob 


Em sexta-feira, 22 de junho de 2012 11h14min31s UTC-3, SS escreveu:
Ya, y cnt we all just create a FORM/Link to get the MASSIVE VOTES fr this subject & SEND it to Google, so tht they can take ACTION promptly fr this App Engine Wrapper?
Also, I want them to make them Cloud SQL as a free trial on a User Basis, atleast fr a month.

They really have to improve Standards in terms of marketing New Products fr Entreprise!!

--Som

On Fri, Jun 22, 2012 at 9:45 PM, JohnSuper <googleadmin@platoacademy.net> wrote:
Ya, based on previous statements I thing everyone was just sitting back waiting thinking it was being worked on and will be coming down the pipes in a rollout.

Since it is not on the radar I think those, like me, who have just been sitting quietly waiting, need to voice out.   I know that even if there is tons of interest, nothing gets in the pipeline unless the interest is voiced massively. 

It's odd that there is a Google BigQuery connector and access API's for apps script but not for CloudSQL

John


On Friday, June 15, 2012 7:48:48 PM UTC-4, Joe Faith wrote:
Hi John

we don't have plans to release an Apps Script JDBC connector in the near future.

J

On Fri, Jun 15, 2012 at 12:24 PM, JohnSuper <googleadmin@platoacademy.net> wrote:
Any update on Cloud SQL access from Google Apps Script JDBC?

In the mean time has anyone written a App Engine Wrapper that has an example code to post?

I don't want to waste time writing a wrapper if Apps Script JDBC access is coming out in a couple of weeks or something.  But if it going to be a while or not in the immediate future it might be worth the time...

I'm assuming  a wrapper entails an apps script URLFetching an app engine app that takes a SQL statement as an incoming parameter, calls a Google Cloud SQL database and outputs a table of results that the  apps script URL fetch receives as return output into a text?   Or am I confused?

John



On Tuesday, November 29, 2011 9:29:10 AM UTC-5, Saurabh Gupta wrote:
Integrating Cloud SQL with Apps Script is being considered. In the meantime, you can write an App Engine service as a wrapper that exposes Cloud SQL data to your Scripts.

-saurabh



--
Joe Faith | Product Manager | Google Cloud

no new connections from MS applications

With the release of App Engine 1.7.0, it will no longer be possible to authorize new connections to Google Cloud SQL from MS applications.

J

--
Joe Faith | Product Manager | Google Cloud

Re: Google Apps Script JDBC Service and Google Cloud SQL

So  this does not work with Google Cloud SQL and Google Apps Scripts?

I have to continue using the spreadsheets??

It is the last missing link for Google Apps Script (UI) and Sites to be complete!  

Cheers,
Jacob 


Em sexta-feira, 22 de junho de 2012 11h14min31s UTC-3, SS escreveu:
Ya, y cnt we all just create a FORM/Link to get the MASSIVE VOTES fr this subject & SEND it to Google, so tht they can take ACTION promptly fr this App Engine Wrapper?
Also, I want them to make them Cloud SQL as a free trial on a User Basis, atleast fr a month.

They really have to improve Standards in terms of marketing New Products fr Entreprise!!

--Som

On Fri, Jun 22, 2012 at 9:45 PM, JohnSuper <googleadmin@platoacademy.net> wrote:
Ya, based on previous statements I thing everyone was just sitting back waiting thinking it was being worked on and will be coming down the pipes in a rollout.

Since it is not on the radar I think those, like me, who have just been sitting quietly waiting, need to voice out.   I know that even if there is tons of interest, nothing gets in the pipeline unless the interest is voiced massively. 

It's odd that there is a Google BigQuery connector and access API's for apps script but not for CloudSQL

John


On Friday, June 15, 2012 7:48:48 PM UTC-4, Joe Faith wrote:
Hi John

we don't have plans to release an Apps Script JDBC connector in the near future.

J

On Fri, Jun 15, 2012 at 12:24 PM, JohnSuper <googleadmin@platoacademy.net> wrote:
Any update on Cloud SQL access from Google Apps Script JDBC?

In the mean time has anyone written a App Engine Wrapper that has an example code to post?

I don't want to waste time writing a wrapper if Apps Script JDBC access is coming out in a couple of weeks or something.  But if it going to be a while or not in the immediate future it might be worth the time...

I'm assuming  a wrapper entails an apps script URLFetching an app engine app that takes a SQL statement as an incoming parameter, calls a Google Cloud SQL database and outputs a table of results that the  apps script URL fetch receives as return output into a text?   Or am I confused?

John



On Tuesday, November 29, 2011 9:29:10 AM UTC-5, Saurabh Gupta wrote:
Integrating Cloud SQL with Apps Script is being considered. In the meantime, you can write an App Engine service as a wrapper that exposes Cloud SQL data to your Scripts.

-saurabh



--
Joe Faith | Product Manager | Google Cloud

Re: Error when attempting to add authorized apps

Thanks Ken!

On Friday, June 29, 2012 3:21:20 PM UTC-5, Ken Ashcraft wrote:
We worked on this off-list.  It turns out that the app was a Master-slave (M/S) app.  Because M/S is deprecated, we recently added a check to prevent developers from adding those apps to Cloud SQL.  Trying again with an HRD app worked.

I'll figure out why the proper error message didn't show up.  Sorry about that!

Ken

On Fri, Jun 29, 2012 at 12:45 PM, Ken Ashcraft <> wrote:
On Fri, Jun 29, 2012 at 11:42 AM, Tim Jones <> wrote:
Whenever I attempt to authorize an app, I get " An unexpected error has occurred. We're looking into it. " and nothing changes.  Is there anything I can do to fix this or do I just have to sit back and wait for an undetermined amount of time?

What is your instance name and what is the name of the app you are trying to authorize?

Feel free to reply off list.

Re: Error when attempting to add authorized apps

In case anyone else has had this problem, it turns out this was caused by attempting to add a non-HRD app, which as of apparently quite recently is not supported.

On Friday, June 29, 2012 1:42:46 PM UTC-5, Tim Jones wrote:
Whenever I attempt to authorize an app, I get " An unexpected error has occurred. We're looking into it. " and nothing changes.  Is there anything I can do to fix this or do I just have to sit back and wait for an undetermined amount of time?

Re: Hello to the group! (and a quick question)

Thanks, I'll give that a go. It looks promissing :-)

On Friday, 29 June 2012 20:46:52 UTC+1, Ken Ashcraft wrote:
You might be able to get Toad to work if you use something like the Tungsten Connector.

Ken

On Fri, Jun 29, 2012 at 12:31 PM, Chris Hatton <codecrocodile@gmail.com> wrote:
Hello all, I'm just getting started with Google Cloud SQL and was just wondering what sql client you guys are using? I presume that Toad for MySQL is not going to work for this - correct me if I'm wrong. Is there anything else other than SQuirrel you would recommend using? It's against my principles to pay for anything being a Java developer :-) but I don't mind paying if the tool is good and doesn't cost too much.

Thanks in advance.


Chris

Re: Error when attempting to add authorized apps

We worked on this off-list.  It turns out that the app was a Master-slave (M/S) app.  Because M/S is deprecated, we recently added a check to prevent developers from adding those apps to Cloud SQL.  Trying again with an HRD app worked.

I'll figure out why the proper error message didn't show up.  Sorry about that!

Ken

On Fri, Jun 29, 2012 at 12:45 PM, Ken Ashcraft <kash@google.com> wrote:
On Fri, Jun 29, 2012 at 11:42 AM, Tim Jones <palantar@gmail.com> wrote:
Whenever I attempt to authorize an app, I get " An unexpected error has occurred. We're looking into it. " and nothing changes.  Is there anything I can do to fix this or do I just have to sit back and wait for an undetermined amount of time?

What is your instance name and what is the name of the app you are trying to authorize?

Feel free to reply off list.

Re: Hello to the group! (and a quick question)

You might be able to get Toad to work if you use something like the Tungsten Connector.

Ken

On Fri, Jun 29, 2012 at 12:31 PM, Chris Hatton <codecrocodile@gmail.com> wrote:
Hello all, I'm just getting started with Google Cloud SQL and was just wondering what sql client you guys are using? I presume that Toad for MySQL is not going to work for this - correct me if I'm wrong. Is there anything else other than SQuirrel you would recommend using? It's against my principles to pay for anything being a Java developer :-) but I don't mind paying if the tool is good and doesn't cost too much.

Thanks in advance.


Chris

Re: Error when attempting to add authorized apps

On Fri, Jun 29, 2012 at 11:42 AM, Tim Jones <palantar@gmail.com> wrote:
Whenever I attempt to authorize an app, I get " An unexpected error has occurred. We're looking into it. " and nothing changes.  Is there anything I can do to fix this or do I just have to sit back and wait for an undetermined amount of time?

What is your instance name and what is the name of the app you are trying to authorize?

Feel free to reply off list.

Hello to the group! (and a quick question)

Hello all, I'm just getting started with Google Cloud SQL and was just wondering what sql client you guys are using? I presume that Toad for MySQL is not going to work for this - correct me if I'm wrong. Is there anything else other than SQuirrel you would recommend using? It's against my principles to pay for anything being a Java developer :-) but I don't mind paying if the tool is good and doesn't cost too much.

Thanks in advance.


Chris

Error when attempting to add authorized apps

Whenever I attempt to authorize an app, I get " An unexpected error has occurred. We're looking into it. " and nothing changes.  Is there anything I can do to fix this or do I just have to sit back and wait for an undetermined amount of time?

An unexpected error has occurred. We're looking into it.

Are these cases really looked into?

Thursday, June 28, 2012

Re: Troubleshooting "too many concurrent requests"

Let's take this discussion off list since we'll need to get into details specific to your application.

Re: Problem in accessing into my instances

Hi Tony Tseng! 

Thanks for the quick return, it worked fine in a new project,  not in my original project that I used to have in my Api Console. 
I think I will be fine like this, thanks! 

Cheers,
Jacob 

Em quinta-feira, 28 de junho de 2012 12h25min24s UTC-3, Tony Tseng escreveu:
Hi Jacob,
You should be able to activate your Google Cloud SQL service without going through the special signup link now. If you still have problems, please send me your Google APIs Console project id.


On Thu, Jun 28, 2012 at 5:42 AM, Jacob van den Berg <jacobvdb@lagaroo.com.br> wrote:
Hi , 

I also received an email to activate my Google Cloud SQL service. 
After filling out my ID the page redirected and got a simular error 
" An error has occurred. Please retry later. " 

my domain is lagaroo.com.br  user jacobvdb.. 
If you need any extra information please let me know! 

Cheers
Jacob 

Em quinta-feira, 28 de junho de 2012 04h03min40s UTC-3, Marco escreveu:
Dear Tony,
Google Cloud SQL is an awesome service and your support has been amazing.
I have checked my instance and everything is working fine right now.

Thank you very much for your help.
Best Regards,
Marco. 

 

Re: Problem in accessing into my instances

Hi Jacob,
You should be able to activate your Google Cloud SQL service without going through the special signup link now. If you still have problems, please send me your Google APIs Console project id.


On Thu, Jun 28, 2012 at 5:42 AM, Jacob van den Berg <jacobvdb@lagaroo.com.br> wrote:
Hi , 

I also received an email to activate my Google Cloud SQL service. 
After filling out my ID the page redirected and got a simular error 
" An error has occurred. Please retry later. " 

my domain is lagaroo.com.br  user jacobvdb.. 
If you need any extra information please let me know! 

Cheers
Jacob 

Em quinta-feira, 28 de junho de 2012 04h03min40s UTC-3, Marco escreveu:
Dear Tony,
Google Cloud SQL is an awesome service and your support has been amazing.
I have checked my instance and everything is working fine right now.

Thank you very much for your help.
Best Regards,
Marco. 

Re: Problem in accessing into my instances

Hi , 

I also received an email to activate my Google Cloud SQL service. 
After filling out my ID the page redirected and got a simular error 
" An error has occurred. Please retry later. " 

my domain is lagaroo.com.br  user jacobvdb.. 
If you need any extra information please let me know! 

Cheers
Jacob 

Em quinta-feira, 28 de junho de 2012 04h03min40s UTC-3, Marco escreveu:
Dear Tony,
Google Cloud SQL is an awesome service and your support has been amazing.
I have checked my instance and everything is working fine right now.

Thank you very much for your help.
Best Regards,
Marco. 

Re: Troubleshooting "too many concurrent requests"

Hi Ken,

Thanks. The 200+ clients rarely trigger a DB call now, as I'm using
the datastore for caching data and have cron jobs that periodically
flush data to/from GC-SQL and datastore. The DB hangs under a load of
under 1 QPS (according to the GAE dashboard, though I know those
numbers aren't one-to-one for GC-SQL queries) and remains hung even
when there's only a single client in 10 minutes trying to access the
DB. I.e. once the connections are maxed out, none seem to time out in
a quick enough fashion for the system to heal itself.

The application is a research project that involves worker nodes and
the GAE/GC-SQL app as the control master that allocates work and
aggregates results. I can give you more specific detail off-channel,
if that might help. It's a university/Google collaboration, actually.

In general, things work for long stretches now, except that every x
number of hours I come back to find the DB hung with maxed out
connections ("Instance has too many concurrent requests: 101"), which
I can only resolve by restarting my instance manually via the APIs
console. I'm unable to see what the maxed out connections are doing,
as neither the GC-SQL APIs console nor commandline tool can even
connect to the DB to poke around when the connections are maxed out.
There's probably some deadlock scenario that creeps up occasionally,
or otherwise it's the case of random load occasionally leading to a
QPS spike that causes a chain of events (i.e. GAE deadlines --> DB
connections hanging --> GAE using up all 100 connections --> splat).

I think I'd like to take your advice and write another cron job that
kills GC-SQL processes that are stuck waiting too long when the DB
appears down. But, this job would still fail to work once all 100
connections are established (after all, it needs a connection itself
to see the processlist and execute the kill -- same issue that makes
the APIs console mostly useless in this scenario). I'd have to run it
very often to have a chance at being useful. So, this brings me to
another related question:

Is there any programmatic introspection/management available for
GC-SQL instances? E.g. is there a better way to detect and/or
troubleshoot the type of scenario I'm running into? It seems that if
there's an APIs console for it that the team could code up a meta API
for controlling the instance. For example, if I could have GAE calls
that detect the state of the DB, check the number of connections,
(maybe even get the min,max,avg process connection time), test when
the DB fails to load (as the APIs console typically reports under the
above scenario), and allow me to make a programmatic call to restart
the instance, that would be very useful.

Relatedly, is there any logging visible for the GC-SQL itself?
There's a "Logs" tab in the APIs console, but that only shows when I
first created the instance. It could be a bit more verbose. :-)

Thanks for your time and help!
Jake





On Mon, Jun 25, 2012 at 7:42 PM, Ken Ashcraft <kash@google.com> wrote:
> On Sat, Jun 23, 2012 at 5:46 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>>
>> Hi Ken,
>>
>> I'm the one that asked both of those questions. :-)
>>
>> I still hit the limits and my application becomes unusable after a
>> while with everything waiting for the SQL processes that are hung and
>> using up the 100 connection limit it seems.  It's only after I restart
>> my instance in the API console that things start working again.  Is
>> there a way to programatically restart the instance?
>
>
> No, sorry.
>
>>
>> Is there a way to
>> reduce the timeout on the connections so that it's the same/less than
>> the GAE timeout?
>
>
> Not really.  You can reduce the deadlock timeout within mysql.
> http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_lock_wait_timeout
>
> You could also set up a cron job to kill long-running queries.
>
>>
>> Other ideas?  I can't be the only one with 200+ clients that
>> occasionally trigger GC-SQL queries.   I have a hard time believing a
>> Google cloud product isn't designed to scale to my miniscule load.
>>
>
> 200+ simultaneous clients sounds like thousands of QPS.  I wouldn't call
> that miniscule.  Cloud SQL doesn't do anything magical to make your database
> scale.  It is a mysql server running on fault tolerant storage.  No
> autosharding or anything like that.  Keep in mind that because we do
> synchronous replication, write latencies are higher than what you'd get with
> a local mysql.  That might cause you to hold locks longer than you'd expect.
>
> We can increase the limit, but every time we've seen somebody run into this
> situation, increasing the limit would just make things worse.  More
> simultaneous queries would mean more contention and more timeouts.
>
> What is your application?
>
> Ken
>
>>
>>
>> On Fri, Jun 22, 2012 at 4:12 PM, Ken Ashcraft <kash@google.com> wrote:
>> > These might help:
>> >
>> > http://stackoverflow.com/questions/10424442/what-are-the-connection-limits-for-google-cloud-sql-from-app-engine-and-how-to
>> >
>> > http://stackoverflow.com/questions/10158805/whats-a-good-approach-to-managing-the-db-connection-in-a-google-cloud-sql-gae/10438622#10438622
>> >
>> >
>> > On Fri, Jun 22, 2012 at 2:48 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>> >>
>> >> Hello,
>> >>
>> >> I've been working on a GAE / Cloud SQL app for many weeks and keep
>> >> hitting the wall on various GC-SQL limits that have forced me to
>> >> refactor my app several times.  A persistent one I'm running into is
>> >> the error:
>> >>
>> >> google.storage.speckle.python.api.rdbms.0: Instance has too many
>> >> concurrent requests: 101
>> >>
>> >> Does anyone have any advice for troubleshooting this error or
>> >> otherwise coding database connections in a way that
>> >> minimizes/mitigates this limitation?
>> >>
>> >> My app has a couple hundred clients, and I've already had to refactor
>> >> it substantially to use the datastore instead of GC-SQL for most
>> >> interaction with clients (data is then synced to-from GC-SQL via cron
>> >> jobs... which also are exceeding the 60 second Deadline occasionally,
>> >> but that's another issue...).  Right now, there's only a single type
>> >> of request that my clients still perform that needs to access the
>> >> GC-SQL DB directly (as opposed to datastore), due to consistency
>> >> requirements. This request happens, ballpark, once every 30 seconds or
>> >> so, on average, though sometimes there are a bunch in a row (i.e. one
>> >> every couple seconds for a minute or two).
>> >>
>> >> I can't even view processes (i.e. via "show processlist") and kill
>> >> threads via the Google APIs console SQL Prompt, as it displays "Failed
>> >> to load databases."   I know that restarting my instance (and waiting
>> >> several minutes) usually will get me back on track, but I've gotten
>> >> frustrated and am wondering what other strategies or ideas folks have
>> >> for dealing with the database connection limits.
>> >>
>> >> Thanks in advance,
>> >> Jake
>> >
>> >
>
>

Re: Instance is suspended due to billing issues.

it's now running.

I hope the issue is fixed permanently. 

Thank you for the support.

On Thursday, June 28, 2012 5:25:44 PM UTC+9, Tony Tseng wrote:
Your instance should remain running now. Please let us know if you're still experiencing problems.


On Wed, Jun 27, 2012 at 10:40 PM, Tony Tseng <ttt@google.com> wrote:
Apologies. We're looking into it.


On Wed, Jun 27, 2012 at 10:20 PM, KWANGMIN NOH <nohkwangmin@gmail.com> wrote:
It was fixed and suspended again.
It happens periodically, automatically.
Can you really fix it please? 
My service is live and it has happened twice in a day. 
I'm getting bad comments on the market from users. :(

On Thursday, June 28, 2012 9:35:45 AM UTC+9, KWANGMIN NOH wrote:
Hi,

My Google Cloud Sql Instance is suspended due to billing issues.
This is the log message I got from the Appengine Dashboard.
java.sql.SQLInvalidAuthorizationSpecException: epenpal-cloudsql:epenpal has been suspended due to billing issues.

I have read thru the pricing page below.
and I changed the plans from D8 into D1 package two days ago.
My understanding is the quota is exceeded, it will be charged at per use rate and 
I wonder why my account is suspended.

'Use of storage or I/O over the included quota is charged at the Per Use rate ($0.24 per GB per month for storage, $0.10 per Million of I/Os). The maximum storage for any instance is currently 10GB.'

since my serivice is growing, I wonder I have to change into per use plan or upgrade into higher instances like D2, D4, or D8.
I am using this service for my Android app, ePenpal and now it's not working.
Will it be back to normal tomorrow since it's daily charge. I'm kind of worried.

Any suggestion and comments will be appreciated and sorry for my bad English.
Thank you in advance.



Re: Instance is suspended due to billing issues.

Your instance should remain running now. Please let us know if you're still experiencing problems.


On Wed, Jun 27, 2012 at 10:40 PM, Tony Tseng <ttt@google.com> wrote:
Apologies. We're looking into it.


On Wed, Jun 27, 2012 at 10:20 PM, KWANGMIN NOH <nohkwangmin@gmail.com> wrote:
It was fixed and suspended again.
It happens periodically, automatically.
Can you really fix it please? 
My service is live and it has happened twice in a day. 
I'm getting bad comments on the market from users. :(

On Thursday, June 28, 2012 9:35:45 AM UTC+9, KWANGMIN NOH wrote:
Hi,

My Google Cloud Sql Instance is suspended due to billing issues.
This is the log message I got from the Appengine Dashboard.
    java.sql.SQLInvalidAuthorizationSpecException: epenpal-cloudsql:epenpal has been suspended due to billing issues.

I have read thru the pricing page below.
and I changed the plans from D8 into D1 package two days ago.
My understanding is the quota is exceeded, it will be charged at per use rate and 
I wonder why my account is suspended.

'Use of storage or I/O over the included quota is charged at the Per Use rate ($0.24 per GB per month for storage, $0.10 per Million of I/Os). The maximum storage for any instance is currently 10GB.'

since my serivice is growing, I wonder I have to change into per use plan or upgrade into higher instances like D2, D4, or D8.
I am using this service for my Android app, ePenpal and now it's not working.
Will it be back to normal tomorrow since it's daily charge. I'm kind of worried.

Any suggestion and comments will be appreciated and sorry for my bad English.
Thank you in advance.



Re: Problem in accessing into my instances

Dear Tony,
Google Cloud SQL is an awesome service and your support has been amazing.
I have checked my instance and everything is working fine right now.

Thank you very much for your help.
Best Regards,
Marco. 

Wednesday, June 27, 2012

Re: Problem in accessing into my instances

No it's not related to billing. It's a separate issue with a recent configuration change in our management server, and it shouldn't affect your Cloud SQL instance's serving state. Sorry about the disruption.


On Wed, Jun 27, 2012 at 11:54 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear Tony,
thank you very much for your great support!!!!
Is possible to have more insight about the problem? Was it tied to the billing?

Thank you very much and best Regards,
Marco.

On Thursday, June 28, 2012 8:52:59 AM UTC+2, Tony Tseng wrote:
We've identified the issue and are applying the fix right now.


On Wed, Jun 27, 2012 at 11:39 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear Tony,
I have sent to you the reply off-list.
Thank you very much for your kind support.

Best Regards,
Marco.

On Thursday, June 28, 2012 8:31:29 AM UTC+2, Tony Tseng wrote:
Hi Marco,
What is the name of your instance? Feel free to reply off-list.


On Wed, Jun 27, 2012 at 11:29 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear all,
I was using correctly Google Cloud SQL since yesterday. 
Starting from today (I have activated billing this morning) I am not able to get access to my instance because I am getting this error: "An unexpected error has occurred. We're looking into it.". 
It is a problem because I have a GoogleAppEngine application that makes use of a Google Cloud SQL instance: I hope that I have not lost any data.
Do you have any idea about how to fix this problem?

Than you very much for your kind support and best Regards,
Marco.



Re: Problem in accessing into my instances

Dear Tony,
thank you very much for your great support!!!!
Is possible to have more insight about the problem? Was it tied to the billing?

Thank you very much and best Regards,
Marco.

On Thursday, June 28, 2012 8:52:59 AM UTC+2, Tony Tseng wrote:
We've identified the issue and are applying the fix right now.


On Wed, Jun 27, 2012 at 11:39 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear Tony,
I have sent to you the reply off-list.
Thank you very much for your kind support.

Best Regards,
Marco.

On Thursday, June 28, 2012 8:31:29 AM UTC+2, Tony Tseng wrote:
Hi Marco,
What is the name of your instance? Feel free to reply off-list.


On Wed, Jun 27, 2012 at 11:29 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear all,
I was using correctly Google Cloud SQL since yesterday. 
Starting from today (I have activated billing this morning) I am not able to get access to my instance because I am getting this error: "An unexpected error has occurred. We're looking into it.". 
It is a problem because I have a GoogleAppEngine application that makes use of a Google Cloud SQL instance: I hope that I have not lost any data.
Do you have any idea about how to fix this problem?

Than you very much for your kind support and best Regards,
Marco.


Re: Problem in accessing into my instances

We've identified the issue and are applying the fix right now.


On Wed, Jun 27, 2012 at 11:39 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear Tony,
I have sent to you the reply off-list.
Thank you very much for your kind support.

Best Regards,
Marco.

On Thursday, June 28, 2012 8:31:29 AM UTC+2, Tony Tseng wrote:
Hi Marco,
What is the name of your instance? Feel free to reply off-list.


On Wed, Jun 27, 2012 at 11:29 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear all,
I was using correctly Google Cloud SQL since yesterday. 
Starting from today (I have activated billing this morning) I am not able to get access to my instance because I am getting this error: "An unexpected error has occurred. We're looking into it.". 
It is a problem because I have a GoogleAppEngine application that makes use of a Google Cloud SQL instance: I hope that I have not lost any data.
Do you have any idea about how to fix this problem?

Than you very much for your kind support and best Regards,
Marco.


Re: Problem in accessing into my instances

Dear Tony,
I have sent to you the reply off-list.
Thank you very much for your kind support.

Best Regards,
Marco.

On Thursday, June 28, 2012 8:31:29 AM UTC+2, Tony Tseng wrote:
Hi Marco,
What is the name of your instance? Feel free to reply off-list.


On Wed, Jun 27, 2012 at 11:29 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear all,
I was using correctly Google Cloud SQL since yesterday. 
Starting from today (I have activated billing this morning) I am not able to get access to my instance because I am getting this error: "An unexpected error has occurred. We're looking into it.". 
It is a problem because I have a GoogleAppEngine application that makes use of a Google Cloud SQL instance: I hope that I have not lost any data.
Do you have any idea about how to fix this problem?

Than you very much for your kind support and best Regards,
Marco.

Re: Problem in accessing into my instances

Hi Marco,
What is the name of your instance? Feel free to reply off-list.


On Wed, Jun 27, 2012 at 11:29 PM, Marco <marco.tranquillin@gmail.com> wrote:
Dear all,
I was using correctly Google Cloud SQL since yesterday. 
Starting from today (I have activated billing this morning) I am not able to get access to my instance because I am getting this error: "An unexpected error has occurred. We're looking into it.". 
It is a problem because I have a GoogleAppEngine application that makes use of a Google Cloud SQL instance: I hope that I have not lost any data.
Do you have any idea about how to fix this problem?

Than you very much for your kind support and best Regards,
Marco.

Problem in accessing into my instances

Dear all,
I was using correctly Google Cloud SQL since yesterday. 
Starting from today (I have activated billing this morning) I am not able to get access to my instance because I am getting this error: "An unexpected error has occurred. We're looking into it.". 
It is a problem because I have a GoogleAppEngine application that makes use of a Google Cloud SQL instance: I hope that I have not lost any data.
Do you have any idea about how to fix this problem?

Than you very much for your kind support and best Regards,
Marco.

Re: Instance is suspended due to billing issues.

Apologies. We're looking into it.


On Wed, Jun 27, 2012 at 10:20 PM, KWANGMIN NOH <nohkwangmin@gmail.com> wrote:
It was fixed and suspended again.
It happens periodically, automatically.
Can you really fix it please? 
My service is live and it has happened twice in a day. 
I'm getting bad comments on the market from users. :(

On Thursday, June 28, 2012 9:35:45 AM UTC+9, KWANGMIN NOH wrote:
Hi,

My Google Cloud Sql Instance is suspended due to billing issues.
This is the log message I got from the Appengine Dashboard.
    java.sql.SQLInvalidAuthorizationSpecException: epenpal-cloudsql:epenpal has been suspended due to billing issues.

I have read thru the pricing page below.
and I changed the plans from D8 into D1 package two days ago.
My understanding is the quota is exceeded, it will be charged at per use rate and 
I wonder why my account is suspended.

'Use of storage or I/O over the included quota is charged at the Per Use rate ($0.24 per GB per month for storage, $0.10 per Million of I/Os). The maximum storage for any instance is currently 10GB.'

since my serivice is growing, I wonder I have to change into per use plan or upgrade into higher instances like D2, D4, or D8.
I am using this service for my Android app, ePenpal and now it's not working.
Will it be back to normal tomorrow since it's daily charge. I'm kind of worried.

Any suggestion and comments will be appreciated and sorry for my bad English.
Thank you in advance.


Re: Instance is suspended due to billing issues.

It was fixed and suspended again.
It happens periodically, automatically.
Can you really fix it please? 
My service is live and it has happened twice in a day. 
I'm getting bad comments on the market from users. :(

On Thursday, June 28, 2012 9:35:45 AM UTC+9, KWANGMIN NOH wrote:
Hi,

My Google Cloud Sql Instance is suspended due to billing issues.
This is the log message I got from the Appengine Dashboard.
java.sql.SQLInvalidAuthorizationSpecException: epenpal-cloudsql:epenpal has been suspended due to billing issues.

I have read thru the pricing page below.
and I changed the plans from D8 into D1 package two days ago.
My understanding is the quota is exceeded, it will be charged at per use rate and 
I wonder why my account is suspended.

'Use of storage or I/O over the included quota is charged at the Per Use rate ($0.24 per GB per month for storage, $0.10 per Million of I/Os). The maximum storage for any instance is currently 10GB.'

since my serivice is growing, I wonder I have to change into per use plan or upgrade into higher instances like D2, D4, or D8.
I am using this service for my Android app, ePenpal and now it's not working.
Will it be back to normal tomorrow since it's daily charge. I'm kind of worried.

Any suggestion and comments will be appreciated and sorry for my bad English.
Thank you in advance.

Instance is suspended due to billing issues.

Hi,

My Google Cloud Sql Instance is suspended due to billing issues.
This is the log message I got from the Appengine Dashboard.
java.sql.SQLInvalidAuthorizationSpecException: epenpal-cloudsql:epenpal has been suspended due to billing issues.

I have read thru the pricing page below.
https://developers.google.com/cloud-sql/docs/billing
and I changed the plans from D8 into D1 package two days ago.
My understanding is the quota is exceeded, it will be charged at per use rate and 
I wonder why my account is suspended.

'Use of storage or I/O over the included quota is charged at the Per Use rate ($0.24 per GB per month for storage, $0.10 per Million of I/Os). The maximum storage for any instance is currently 10GB.'

since my serivice is growing, I wonder I have to change into per use plan or upgrade into higher instances like D2, D4, or D8.
I am using this service for my Android app, ePenpal and now it's not working.
Will it be back to normal tomorrow since it's daily charge. I'm kind of worried.

Any suggestion and comments will be appreciated and sorry for my bad English.
Thank you in advance.

My account(Instance) is suspended.

Hi,

I'm not sure this is the right place. 
A couple of hours ago my Google Cloud Sql service instance(epenpal-cloudsql:epenpal) is suspended.
I'm using this service for my Android application, ePenpal, now it's not working properly since
I use the Google cloud sql service to save users' profile

Can I know the reason? 
Is it that my application violates any terms of service or is it because there is some issues?

Please at least let me know the contact information so that I can email you or you could possibly email me at nohkwangmin@gmail.com.

Thank you in advance. 

Re: The rdbms API is not available because the MySQLdb library could not be loaded.

2012-06-27 ..... 305 rdbms_mysqldb.py:741 The rdbms API is not availale because the MySQLdb library could not be loaded.

I've tried these solutions not sure what's going on.
-GAE 1.7 being used with
python 2.7.3
On Wednesday, November 30, 2011 4:15:36 PM UTC-5, Philip wrote:
I have installed MySQL and the necessary support libraries / files
locally. It is accessible from MySQLWorkbench, Squirrel, and the
Python 2.7 command line (i.e. import MySQLdb succeeds without any
errors). I added the following line to my ./bash_profile file too:

export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/"

When I try to start dev_appserver in Eclipse or from a command line
using:

dev_appserver.py --debug --mysql_user=root myapp

I get the following warning and error:

WARNING  2011-11-30 21:07:54,891 rdbms_mysqldb.py:90] The rdbms API is
not available because the MySQLdb library could not be loaded.

ERROR    2011-11-30 21:08:19,042 dev_appserver_main.py:632] <type
'exceptions.NotImplementedError'>: Unable to find the MySQLdb library.
Please see the SDK documentation for installation instructions.

DEBUG    2011-11-30 21:08:19,046 dev_appserver_main.py:634] Traceback
(most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver_main.py", line 629, in main
    dev_appserver.SetupStubs(appinfo.application, **option_dict)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 3183, in SetupStubs
    rdbms_mysqldb.connect(database='')
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/rdbms_mysqldb.py", line 96, in connect
    'Unable to find the MySQLdb library. Please see the SDK '

I have tried the hack of adding "import MySQLdb" to the
dev_appserver.py file, but that didn't help.

Any ideas?

Tuesday, June 26, 2012

Re: [GCSQL] DatabaseError: 0: Connection is already in use

Thanks for the good pointer. I'll reduce the lock timeout and see if
that helps.

Cheers,
Jake

On Mon, Jun 25, 2012 at 7:55 PM, Ken Ashcraft <kash@google.com> wrote:
> On Mon, Jun 25, 2012 at 4:38 PM, Jake Czyz <jjc.work@gmail.com> wrote:
>>
>> Yes, that makes sense.  It pops up in a finally clause of a
>> try/except/finally block, which was meant to ensure tables are
>> unlocked in the event of other DB snafus.  I guess if the snafu is a
>> deadline exception,  I never see it because the finally gets executed
>> (and this error pops up) before the Deadline Exceeded is re-raised.
>>
>> Thanks.  This still sucks, but at least I have a better understanding
>> of why.  Darn deadlines... :-)
>>
>
> I agree that it could be better.  If the query goes past its deadline, the
> Cloud SQL server will close the connection (and therefore release the locks)
> with the assumption that the application is long gone.  But that doesn't
> happen until the query completes.  Since mysql doesn't support deadlines, it
> would be better to snipe the query as soon as the host server detects that
> the query is past its deadline.  No promises there since that might be
> tricky to implement.
>
> Here is a SO question that might be helpful for you in the meantime:
> http://stackoverflow.com/questions/2137084/setup-mysql-query-timeout
>
>
> Ken
>
>>
>>
>> On Mon, Jun 25, 2012 at 7:32 PM, Ken Ashcraft <kash@google.com> wrote:
>> > This error typically happens when you have a deadline exceeded
>> > exception.
>> >  The app gives up, but the query is still running on the server.  If you
>> > try
>> > to do anything else with the connection, the server will complain that
>> > the
>> > connection is already in use.  So if you get the "connection already in
>> > use"
>> > error, it means that you probably have some place else in your code
>> > where
>> > you ignored the deadline exceeded exception and reused a connection.
>> >
>> > On Sat, Jun 23, 2012 at 5:47 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>> >>
>> >> Hi Ken,
>> >>
>> >> Thanks, but could you please clarify?  Do you mean I need to catch
>> >> this error, recreate a connection and retry the same query?
>> >>
>> >> Jake
>> >>
>> >>
>> >>
>> >> On Fri, Jun 22, 2012 at 4:15 PM, Ken Ashcraft <kash@google.com> wrote:
>> >> > It means that the query is still executing on the server.  You need
>> >> > to
>> >> > throw
>> >> > away the connection and create a new one.
>> >> >
>> >> >
>> >> > On Fri, Jun 22, 2012 at 1:48 AM, Jake Czyz <jjc.work@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> Hello,
>> >> >>
>> >> >> My GAE app gets the following error occasionally during GC-SQL
>> >> >> calls,
>> >> >> when unlocking previously locked tables.  Searching for the error
>> >> >> turned up nothing.  Does anyone have an idea about what could cause
>> >> >> it?
>> >> >>
>> >> >> <snip>
>> >> >>    cursor.execute('UNLOCK TABLES') #always unlock
>> >> >>  File "/base/python27_runtime/
>> >> >> python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> >> line 424, in execute
>> >> >>    self._DoExec(request)
>> >> >>  File
>> >> >>
>> >> >>
>> >> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> >> line 355, in _DoExec
>> >> >>    response = self._conn.MakeRequest('Exec', request)
>> >> >>  File
>> >> >>
>> >> >>
>> >> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> >> line 711, in MakeRequest
>> >> >>    response = self._MakeRetriableRequest(stub_method, request)
>> >> >>  File
>> >> >>
>> >> >>
>> >> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> >> line 742, in _MakeRetriableRequest
>> >> >>    sql_exception.message))
>> >> >> DatabaseError: 0: Connection is already in use.
>> >> >>
>> >> >>
>> >> >> Thanks in advance,
>> >> >> Jake
>> >> >
>> >> >
>> >
>> >
>
>

Monday, June 25, 2012

Re: [GCSQL] DatabaseError: 0: Connection is already in use

On Mon, Jun 25, 2012 at 4:38 PM, Jake Czyz <jjc.work@gmail.com> wrote:
Yes, that makes sense.  It pops up in a finally clause of a
try/except/finally block, which was meant to ensure tables are
unlocked in the event of other DB snafus.  I guess if the snafu is a
deadline exception,  I never see it because the finally gets executed
(and this error pops up) before the Deadline Exceeded is re-raised.

Thanks.  This still sucks, but at least I have a better understanding
of why.  Darn deadlines... :-)


I agree that it could be better.  If the query goes past its deadline, the Cloud SQL server will close the connection (and therefore release the locks) with the assumption that the application is long gone.  But that doesn't happen until the query completes.  Since mysql doesn't support deadlines, it would be better to snipe the query as soon as the host server detects that the query is past its deadline.  No promises there since that might be tricky to implement.

Here is a SO question that might be helpful for you in the meantime:
 

Ken



On Mon, Jun 25, 2012 at 7:32 PM, Ken Ashcraft <kash@google.com> wrote:
> This error typically happens when you have a deadline exceeded exception.
>  The app gives up, but the query is still running on the server.  If you try
> to do anything else with the connection, the server will complain that the
> connection is already in use.  So if you get the "connection already in use"
> error, it means that you probably have some place else in your code where
> you ignored the deadline exceeded exception and reused a connection.
>
> On Sat, Jun 23, 2012 at 5:47 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>>
>> Hi Ken,
>>
>> Thanks, but could you please clarify?  Do you mean I need to catch
>> this error, recreate a connection and retry the same query?
>>
>> Jake
>>
>>
>>
>> On Fri, Jun 22, 2012 at 4:15 PM, Ken Ashcraft <kash@google.com> wrote:
>> > It means that the query is still executing on the server.  You need to
>> > throw
>> > away the connection and create a new one.
>> >
>> >
>> > On Fri, Jun 22, 2012 at 1:48 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>> >>
>> >> Hello,
>> >>
>> >> My GAE app gets the following error occasionally during GC-SQL calls,
>> >> when unlocking previously locked tables.  Searching for the error
>> >> turned up nothing.  Does anyone have an idea about what could cause
>> >> it?
>> >>
>> >> <snip>
>> >>    cursor.execute('UNLOCK TABLES') #always unlock
>> >>  File "/base/python27_runtime/
>> >> python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 424, in execute
>> >>    self._DoExec(request)
>> >>  File
>> >>
>> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 355, in _DoExec
>> >>    response = self._conn.MakeRequest('Exec', request)
>> >>  File
>> >>
>> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 711, in MakeRequest
>> >>    response = self._MakeRetriableRequest(stub_method, request)
>> >>  File
>> >>
>> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 742, in _MakeRetriableRequest
>> >>    sql_exception.message))
>> >> DatabaseError: 0: Connection is already in use.
>> >>
>> >>
>> >> Thanks in advance,
>> >> Jake
>> >
>> >
>
>

Re: Troubleshooting "too many concurrent requests"

On Sat, Jun 23, 2012 at 5:46 AM, Jake Czyz <jjc.work@gmail.com> wrote:
Hi Ken,

I'm the one that asked both of those questions. :-)

I still hit the limits and my application becomes unusable after a
while with everything waiting for the SQL processes that are hung and
using up the 100 connection limit it seems.  It's only after I restart
my instance in the API console that things start working again.  Is
there a way to programatically restart the instance?

No, sorry.
 
Is there a way to
reduce the timeout on the connections so that it's the same/less than
the GAE timeout?

Not really.  You can reduce the deadlock timeout within mysql.
 
You could also set up a cron job to kill long-running queries.
 
Other ideas?  I can't be the only one with 200+ clients that
occasionally trigger GC-SQL queries.   I have a hard time believing a
Google cloud product isn't designed to scale to my miniscule load.


200+ simultaneous clients sounds like thousands of QPS.  I wouldn't call that miniscule.  Cloud SQL doesn't do anything magical to make your database scale.  It is a mysql server running on fault tolerant storage.  No autosharding or anything like that.  Keep in mind that because we do synchronous replication, write latencies are higher than what you'd get with a local mysql.  That might cause you to hold locks longer than you'd expect.

We can increase the limit, but every time we've seen somebody run into this situation, increasing the limit would just make things worse.  More simultaneous queries would mean more contention and more timeouts.

What is your application?

Ken
 

On Fri, Jun 22, 2012 at 4:12 PM, Ken Ashcraft <kash@google.com> wrote:
> These might help:
> http://stackoverflow.com/questions/10424442/what-are-the-connection-limits-for-google-cloud-sql-from-app-engine-and-how-to
> http://stackoverflow.com/questions/10158805/whats-a-good-approach-to-managing-the-db-connection-in-a-google-cloud-sql-gae/10438622#10438622
>
>
> On Fri, Jun 22, 2012 at 2:48 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>>
>> Hello,
>>
>> I've been working on a GAE / Cloud SQL app for many weeks and keep
>> hitting the wall on various GC-SQL limits that have forced me to
>> refactor my app several times.  A persistent one I'm running into is
>> the error:
>>
>> google.storage.speckle.python.api.rdbms.0: Instance has too many
>> concurrent requests: 101
>>
>> Does anyone have any advice for troubleshooting this error or
>> otherwise coding database connections in a way that
>> minimizes/mitigates this limitation?
>>
>> My app has a couple hundred clients, and I've already had to refactor
>> it substantially to use the datastore instead of GC-SQL for most
>> interaction with clients (data is then synced to-from GC-SQL via cron
>> jobs... which also are exceeding the 60 second Deadline occasionally,
>> but that's another issue...).  Right now, there's only a single type
>> of request that my clients still perform that needs to access the
>> GC-SQL DB directly (as opposed to datastore), due to consistency
>> requirements. This request happens, ballpark, once every 30 seconds or
>> so, on average, though sometimes there are a bunch in a row (i.e. one
>> every couple seconds for a minute or two).
>>
>> I can't even view processes (i.e. via "show processlist") and kill
>> threads via the Google APIs console SQL Prompt, as it displays "Failed
>> to load databases."   I know that restarting my instance (and waiting
>> several minutes) usually will get me back on track, but I've gotten
>> frustrated and am wondering what other strategies or ideas folks have
>> for dealing with the database connection limits.
>>
>> Thanks in advance,
>> Jake
>
>

Re: [GCSQL] DatabaseError: 0: Connection is already in use

Yes, that makes sense. It pops up in a finally clause of a
try/except/finally block, which was meant to ensure tables are
unlocked in the event of other DB snafus. I guess if the snafu is a
deadline exception, I never see it because the finally gets executed
(and this error pops up) before the Deadline Exceeded is re-raised.

Thanks. This still sucks, but at least I have a better understanding
of why. Darn deadlines... :-)

Jake



On Mon, Jun 25, 2012 at 7:32 PM, Ken Ashcraft <kash@google.com> wrote:
> This error typically happens when you have a deadline exceeded exception.
>  The app gives up, but the query is still running on the server.  If you try
> to do anything else with the connection, the server will complain that the
> connection is already in use.  So if you get the "connection already in use"
> error, it means that you probably have some place else in your code where
> you ignored the deadline exceeded exception and reused a connection.
>
> On Sat, Jun 23, 2012 at 5:47 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>>
>> Hi Ken,
>>
>> Thanks, but could you please clarify?  Do you mean I need to catch
>> this error, recreate a connection and retry the same query?
>>
>> Jake
>>
>>
>>
>> On Fri, Jun 22, 2012 at 4:15 PM, Ken Ashcraft <kash@google.com> wrote:
>> > It means that the query is still executing on the server.  You need to
>> > throw
>> > away the connection and create a new one.
>> >
>> >
>> > On Fri, Jun 22, 2012 at 1:48 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>> >>
>> >> Hello,
>> >>
>> >> My GAE app gets the following error occasionally during GC-SQL calls,
>> >> when unlocking previously locked tables.  Searching for the error
>> >> turned up nothing.  Does anyone have an idea about what could cause
>> >> it?
>> >>
>> >> <snip>
>> >>    cursor.execute('UNLOCK TABLES') #always unlock
>> >>  File "/base/python27_runtime/
>> >> python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 424, in execute
>> >>    self._DoExec(request)
>> >>  File
>> >>
>> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 355, in _DoExec
>> >>    response = self._conn.MakeRequest('Exec', request)
>> >>  File
>> >>
>> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 711, in MakeRequest
>> >>    response = self._MakeRetriableRequest(stub_method, request)
>> >>  File
>> >>
>> >> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> >> line 742, in _MakeRetriableRequest
>> >>    sql_exception.message))
>> >> DatabaseError: 0: Connection is already in use.
>> >>
>> >>
>> >> Thanks in advance,
>> >> Jake
>> >
>> >
>
>

Re: [GCSQL] DatabaseError: 0: Connection is already in use

This error typically happens when you have a deadline exceeded exception.  The app gives up, but the query is still running on the server.  If you try to do anything else with the connection, the server will complain that the connection is already in use.  So if you get the "connection already in use" error, it means that you probably have some place else in your code where you ignored the deadline exceeded exception and reused a connection.

On Sat, Jun 23, 2012 at 5:47 AM, Jake Czyz <jjc.work@gmail.com> wrote:
Hi Ken,

Thanks, but could you please clarify?  Do you mean I need to catch
this error, recreate a connection and retry the same query?

Jake



On Fri, Jun 22, 2012 at 4:15 PM, Ken Ashcraft <kash@google.com> wrote:
> It means that the query is still executing on the server.  You need to throw
> away the connection and create a new one.
>
>
> On Fri, Jun 22, 2012 at 1:48 AM, Jake Czyz <jjc.work@gmail.com> wrote:
>>
>> Hello,
>>
>> My GAE app gets the following error occasionally during GC-SQL calls,
>> when unlocking previously locked tables.  Searching for the error
>> turned up nothing.  Does anyone have an idea about what could cause
>> it?
>>
>> <snip>
>>    cursor.execute('UNLOCK TABLES') #always unlock
>>  File "/base/python27_runtime/
>> python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> line 424, in execute
>>    self._DoExec(request)
>>  File
>> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> line 355, in _DoExec
>>    response = self._conn.MakeRequest('Exec', request)
>>  File
>> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> line 711, in MakeRequest
>>    response = self._MakeRetriableRequest(stub_method, request)
>>  File
>> "/base/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
>> line 742, in _MakeRetriableRequest
>>    sql_exception.message))
>> DatabaseError: 0: Connection is already in use.
>>
>>
>> Thanks in advance,
>> Jake
>
>

iPhone App To Help You Regain 20/20 Vision Naturally

http://goo.gl/xQy6Q is an iPhone app that will help you regain 20/20 vision naturally, by looking at images that relaxes your eyes and performing eye exercises that strengthen your eyes, anywhere within your busy life (i.e. office cubicle, crowded subway, waiting at the hair salon, etc.), thanks.

Re: Google Cloud SQL - Issue create new instance

Could you try to create a new instance again and let us know if it still doesn't work?

On Sun, Jun 24, 2012 at 9:54 PM, Adaan Smit <danielpietersmit@gmail.com> wrote:

According to my service summary, I have SQL cloud enabled? Which other service need to be enabled?

On Jun 24, 2012 6:11 PM, "Tony Tseng" <ttt@google.com> wrote:
It appears that Cloud SQL is not enabled somehow. Did you by any chance turn off the service? Can you go to the Services page in your APIs console project and check the status of Cloud SQL?

On Sun, Jun 24, 2012 at 5:27 AM, Adaan Smit <danielpietersmit@gmail.com> wrote:
Hi Tony,

Thank-you for your prompt response.

The old instance name was modulorum.  My current billing status is enabled.

Regards,
Adaan


On Sun, Jun 24, 2012 at 8:07 AM, Tony Tseng <ttt@google.com> wrote:
Hi Adaan,
Can you tell me the name of your old instance? Feel free to reply off list if you want.
Also can you check the billing status of your APIs console project by navigating to the billing tab?


On Sat, Jun 23, 2012 at 7:48 PM, Adaan <danielpietersmit@gmail.com> wrote:
Hi,

I had issues with my instance, I got an error "Databases not found".  I tried to restart the instance, with no success, thereafter I deleted the instance and now I can't create a new one.  I get an error that my billing is not currently activated, yet is enabled.

Regards,
Adaan Smit




--
    Adaan Smit (Daniel Pieter)
    cell :  083 458 2368
    fax:    086 544 2981