Thursday, March 29, 2018

[google-cloud-sql-discuss] My CloudSQL Instance stuck at the restart phase for almost half hour, what should I do, please help?

My CloudSQL Instance stuck at the restart phase for almost half hour, what should I do, please help...

--
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/b9b0201d-7311-4bf5-a5d2-4962e74fc93d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: On-demand backups retention

Hello Eugene,


According to this document, on-demand backups should persist until either you delete them, or until their instance is deleted. As you mentioned, it seems that not all on-demand backups show in the developers Console, but they can all be listed, described, and used to restore the instance by using these gcloud commands [1] [2] [3] in cloudshell or an authenticated SDK instance.


Example commands to list all backups and then use the ID listed to get a description of the backup:


$gcloud sql backups list --instance [INSTANCE]

$gcloud sql backups describe [ID] --instance=[INSTANCE]


There is already a feature request to improve the console's list page at this link, but we can not provide an ETA or guarantee its implementation at the moment. Furthermore, if the first gcloud command above did not list the backups from more than a month ago, please open an issue tracker report for further investigation, and we will be happy to assist.  


--
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/7794e9dd-6701-4630-8648-56836102e381%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: ERROR: recovery is not in progress

The error is logged due to a simple script that checks every 30 seconds for replication status. It shouldn't cause any other problems except making your log spammy. As mentioned in this issue tracker report, we are aware of the issue and should be fixed in the next release.


--
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/70963f94-b673-4371-867f-a6dc6743db49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, March 28, 2018

[google-cloud-sql-discuss] ERROR: recovery is not in progress

I'm seeing this error every 30 secs in my postgres sql instance, does somebody knows what's going on?


ERROR:  recovery is not in progress 
HINT:  Recovery control functions can only be executed during recovery. 
STATEMENT:  SELECT pg_is_xlog_replay_paused(), current_timestamp

Would it be related/affect performance over all? somebody is thinking it might https://stackoverflow.com/questions/49142197/google-cloud-sql-postgres-randomly-slow-queries-from-google-compute-kubernet

Thanks in advance.

--
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/a0b3aef3-cb5a-4b5e-94ac-e82fa9ec2e28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Got an error reading communication packets and Net packets out of order error

Hi,

I have the same problem when doing lots of updates in a for loop, i write on it here as well:
https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues/126

But is there no quick fix to at least make it work even if throttling ? How does people get around this issue which is i guess a very common scenario to do lots of inserts/updates ?
It has never failed to do LOAD DATA INFILE it seems to happen when i do a lot of update queries.

Thanks.

Den måndag 21 augusti 2017 kl. 19:15:30 UTC+2 skrev Shivam(Google Cloud Support):
The CloudSQL team is aware of it, though there is no eta. I suggest to star the issue to get notified for any future updates.

On Monday, August 21, 2017 at 3:54:37 AM UTC-4, Stenn Kool wrote:
Yes we are using a second generation instance, throttling the inserts is hardly a sollution because it would be very hard to keep our data up to date.
Do you know if this bug is going to be resolved in the near future?

Op vrijdag 18 augustus 2017 22:28:51 UTC+2 schreef Shivam(Google Cloud Support):
Are you using CloudSQL second generation instance? The intermittent error 'Got an error reading communication packets' is a known issue and the suggested workaround is to retry the connection with exponential back-off.

'Net packets out of order' seems like a MySQL error and without more context, it is not easy to find the root cause. 


On Friday, August 18, 2017 at 9:24:56 AM UTC-4, Stenn Kool wrote:
I'm seeing the "Got an error reading communication packets" error in the error log and the "Net packets out of order" message in my applications, those applications are written in different languages and running on different connections.
Some of them are running om GKE and others on premise, it seems to happen when A lot of data is being inserted.

Our SQL servers hosted by a different hosting provider have no such issues while under the same load with similar specs.
We've already tried using another connection and increasing the max_allowed_packet flag.
The server is running with a failover and is using the binlog.

example errors from the log:

E  2017-08-18T12:09:41.883032Z 344745 [Note] Aborted connection 344745 to db: '***' user: '***' host: '***.***.***.***' (Got an error reading communication packets) 
E  
2017-08-18T12:11:12.061786Z 362326 [Note] Aborted connection 362326 to db: '***' user: '***' host: '***.***.***.***' (Got timeout reading communication packets)



E  
2017-08-18T13:22:07.443999Z 10400 [Note] Aborted connection 10400 to db: 'cms' user: '***' host: 'cloudsqlproxy~***' (Got an error reading communication packets)
E  
2017-08-18T13:22:07.447055Z 10459 [Note] Aborted connection 10459 to db: 'cms' user: '***' host: 'cloudsqlproxy~***' (Got an error reading communication packets)
E  
2017-08-18T13:22:11.617081Z 10509 [Note] Aborted connection 10509 to db: 'cms' user: '***' host: 'cloudsqlproxy~***' (Got an error reading communication packets)
E  
2017-08-18T13:22:12.841405Z 9892 [Note] Aborted connection 9892 to db: 'cms' user: '***' host: 'cloudsqlproxy~***' (Got timeout reading communication packets)



--
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/9d1935ad-e82a-48ee-9f82-328b49c776fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] On-demand backups retention

I was trying to find in the documents any mention of retention policies for on-demand backups for SQL Cloud instance; finding none assumed that the on-demand backups are retained unless removed.

But in our account all on-demand backups older than month were removed. This is completely unforeseen and we would like to
a) If possible to retrieve the older backups
b) Get to the bottom of it and understand/define retention policy for on-demand backups

Thanks much in advance!
Eugene 

--
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/a72e9107-f669-441f-a384-5f3dd50502fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

On Wednesday, March 28, 2018 at 1:04:02 PM UTC-7, Dinesh (Google Platform Support) wrote:
This is true as per the documentation. To change an instance's service account and access scopes, the instance must be temporarily stopped and restarted after the change.

That was easy to find, probably the easiest part of this whole exercise. Didn't even need to look at the docs; The error messages told me what was wrong, and the "edit" page for the instance told me I had to stop the instance in order to add the scope.

Nonetheless, access from a Compute instance in the same project is only "taken care of" if you've got the requisite access scope enabled. :p

--
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/a848b667-33f8-4b2d-80b5-e5047e8c67ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

This is true as per the documentation. To change an instance's service account and access scopes, the instance must be temporarily stopped and restarted after the change. 

On Tuesday, March 27, 2018 at 5:50:52 PM UTC-4, James Lampert wrote:
Well, everything seems to work, both connecting via the Proxy from my desktop, and connecting via the Proxy from the template Compute instance.

Pia Chamberlain mentioned (in the Issue Tracker) that
The good news is that if your Compute Engine instance is in the same project as your Cloud SQL instance, authentication is taken care of.

Not quite "taken care of," because the Compute instance produced by the Google Click-to-Deploy Tomcat deployment didn't come with the "Cloud SQL" API Access Scope enabled. I had to stop the instance (thereby releasing its ephemeral external IP address), enable the needed access scope, restart it, and update my SSH session to point to the new ephemeral IP address. But at least that part was easy to figure out (and add to my own docs).

Once that small change was made, the Proxy no longer needed a credential to connect. Nice.

--
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/fc85beee-bc6c-440a-8f9e-d67ca2e25bc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, March 27, 2018

[google-cloud-sql-discuss] Re: PostgreSQL instance stalled at 99GB while importing and now stuck on restart

Ok, I'll try to increase the number of CPUs next time.
Anyway, I don't know how it happened but the import finally succeeded 12 hours later !
If you look at read/write operations nothing happens during around 10 hours and suddenly whoops it peaked at 2200 writes/s/s...

Thank you Dinesh.

Le lundi 26 mars 2018 18:16:31 UTC+2, Dinesh (Google Platform Support) a écrit :
I understand instance is available now as system restart finally finished. You may perform CPU upgrade as recommended in my previous post. 

On Sunday, March 25, 2018 at 7:09:01 PM UTC-4, Dinesh (Google Platform Support) wrote:
Hi Stephane,

I observed your instance CPU utilization is hitting around 99.7%. This looks like the main cause of the problem. 

Going forward, I will raise a request with back-end team to unstuck your PostgreSQL instance from the backend and will provide you an update. To resolve the issue, you must increase the number of CPU or upgrade instance machine type. 

You may want to go through Best Practices for data import on Cloud SQL 

Regards,

On Sunday, March 25, 2018 at 12:12:40 PM UTC-4, Stéphane Colzy wrote:
Hi,

I tried to import a 115GB database sql dump into this instance and all went well until it got stuck at 99GB storage usage.
Then I tried to restart it and now it's stuck.

However, this brand new instance had 300GB of storage allocated.

can someone help ?
thx
Stephane

--
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/02332c64-56be-489a-a953-e1e59c056aa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

Well, everything seems to work, both connecting via the Proxy from my desktop, and connecting via the Proxy from the template Compute instance.

Pia Chamberlain mentioned (in the Issue Tracker) that
The good news is that if your Compute Engine instance is in the same project as your Cloud SQL instance, authentication is taken care of.

Not quite "taken care of," because the Compute instance produced by the Google Click-to-Deploy Tomcat deployment didn't come with the "Cloud SQL" API Access Scope enabled. I had to stop the instance (thereby releasing its ephemeral external IP address), enable the needed access scope, restart it, and update my SSH session to point to the new ephemeral IP address. But at least that part was easy to figure out (and add to my own docs).

Once that small change was made, the Proxy no longer needed a credential to connect. Nice.

--
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/8c4ec22c-7b0a-4c19-a835-951fcfc0212c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

On Tuesday, March 27, 2018 at 9:54:10 AM UTC-7, Dinesh (Google Platform Support) wrote:
You may want to try the solution provided by the development team on this PIT thread for the same issue. Try to enable 'Cloud SQL Admin' APIand let us know if that resolves proxy connection issue. If you are unable to do that with own account, I will suggest that to try to enable it with project owner account as described in this document. 

Yes. That's one of my Issue Trackers, and it solved the problem. And I've copied the solution over to a second Issue Tracker I'd started on that specific aspect of the problem, and commented that both could be marked as resolved, and I copied it back to this thread.

This problem was stagnant for so many days, it was a pleasant shock to see it suddenly get unstuck and resolved.

Thanks.

--
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/7058d1b7-3559-43cf-bf0e-da2ea824c199%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

Seems like over posts just overlaps. I am glad your issue is resolved now.  
For the documentation naming issue, please report it via separate PIT thread.  

On Tuesday, March 27, 2018 at 12:54:10 PM UTC-4, Dinesh (Google Platform Support) wrote:
You may want to try the solution provided by the development team on this PIT thread for the same issue. Try to enable 'Cloud SQL Admin' APIand let us know if that resolves proxy connection issue. If you are unable to do that with own account, I will suggest that to try to enable it with project owner account as described in this document. 

The PIT thread you suggested above seems for the same proxy connection issue as you reported on this group thread. If you getting inconsistent results from the gcloud command line and IAM console for the service account roles, I will suggest raising a fresh issue on PIT specifically from IAM roles to avoid any ambiguity. 


On Monday, March 26, 2018 at 5:44:10 PM UTC-4, James Lampert wrote:
For lack of anything else to try, I tried creating a service account with exactly the same roles as my own account (listed in my previous post).

I got a "You do not have permission. . . ." message, and yet the service account got created ANYWAY, and the IAM Dashboard page shows all eleven roles for it.

But it didn't download a key on creation. I was, however, able to create and download a key from the "Create Key" function on the Service Programs page.

Same results as before.

--
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/a891bcff-5d87-40d6-8f9e-5f156452823a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

You may want to try the solution provided by the development team on this PIT thread for the same issue. Try to enable 'Cloud SQL Admin' APIand let us know if that resolves proxy connection issue. If you are unable to do that with own account, I will suggest that to try to enable it with project owner account as described in this document. 

The PIT thread you suggested above seems for the same proxy connection issue as you reported on this group thread. If you getting inconsistent results from the gcloud command line and IAM console for the service account roles, I will suggest raising a fresh issue on PIT specifically from IAM roles to avoid any ambiguity. 


On Monday, March 26, 2018 at 5:44:10 PM UTC-4, James Lampert wrote:
For lack of anything else to try, I tried creating a service account with exactly the same roles as my own account (listed in my previous post).

I got a "You do not have permission. . . ." message, and yet the service account got created ANYWAY, and the IAM Dashboard page shows all eleven roles for it.

But it didn't download a key on creation. I was, however, able to create and download a key from the "Create Key" function on the Service Programs page.

Same results as before.

--
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/c03f68e3-d2c7-45ff-8a79-990f77277ddc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

In Issue Tracker 76011694kv...@google.com asked:

James,

Did you enable the 'Cloud SQL' API, or the 'Cloud SQL Admin' API? I believe the second is needed for the proxy to authenticate.

That did it.

But the descriptive names of the APIs, as shown in both the Library page and the dashboard, are VERY confusing.

"sqladmin.googleapis.com" is called "Google Cloud SQL API," while "sql-component.googleapis.com" is called "Google Cloud SQL."

If the descriptive names were a better match for the actual service names, this probably would have been resolved last week.

Also, I'll note that the icons given in the API Library page are a bit confusing as well: the fact that some icons are in full color, while others are gray (and the lack of any other indication of enablement/disablement), gave both me and my boss the impression of indicating which ones were enabled and which ones were not, and the fact that it contradicted what was shown on the API Dashboard only added to the confusion.

--
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/c2c62163-d8b4-47ef-a17f-69503293ba92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, March 26, 2018

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

For lack of anything else to try, I tried creating a service account with exactly the same roles as my own account (listed in my previous post).

I got a "You do not have permission. . . ." message, and yet the service account got created ANYWAY, and the IAM Dashboard page shows all eleven roles for it.

But it didn't download a key on creation. I was, however, able to create and download a key from the "Create Key" function on the Service Programs page.

Same results as before.

--
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/257a9d7d-2b6d-44a5-857c-309e57a1d519%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: 2 generation sql import sql data

Please elaborate how you trying to import data in second generation SQL instance and what is the output error message observed. It would be great if you could outline what steps you taking to reproduce the error or failure message.

Meanwhile, please find the documentation for importing data into SQL instance (including 2nd generation) and here are best practices for importing and exporting data

Regards,

On Monday, March 26, 2018 at 9:20:31 AM UTC-4, GoBlips goBlips wrote:
i tried to import sql data in 2 generation sql on my cloud server and give to me a error, when i do it in 1 generation works fine any help ?
thanks.
fran.

--
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/18b89b33-5d83-4636-a589-050ce010b45c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: does DriverManager in server side useless in the cloud 2gen SQL?

You only need to configure your pom.xml as shown in the Setting Up step. 

Your appengine-web.xml simply sets two properties 'cloudsql' and 'cloudsql-local' to equal the URLs of your production and local sql instances automatically using the '${xyz}' values which it directly pulls from your pom.xml and populates them to form the URLs as shown in the example code

You can now use those auto-generated property values to determine which URL your code should connect to depending on if you are running locally in development or in production (for example using this Java ternary expression):

String url = hostname.contains("localhost:") ? System.getProperty("cloudsql-local") : System.getProperty("cloudsql");

--
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/aca37ca4-2230-4e64-a8c5-e5c67f14d83a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

And as to my own permissions, 


--
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/c7663576-8f7d-48e6-8488-8596bb22df38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

Verified. It's all in the picture, about three posts back. And there's already an issue-tracker, started by Pia Chamberalin, https://issuetracker.google.com/issues/76011694

I can't help wondering if there's something I need to do (but can't find), to grant specific access to the MySQL server. Or there's something needed besides "Cloud SQL Client."

--
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/5f3bbd70-e827-4222-a838-520baa7b438b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: PostgreSQL instance stalled at 99GB while importing and now stuck on restart

I understand instance is available now as system restart finally finished. You may perform CPU upgrade as recommended in my previous post. 

On Sunday, March 25, 2018 at 7:09:01 PM UTC-4, Dinesh (Google Platform Support) wrote:
Hi Stephane,

I observed your instance CPU utilization is hitting around 99.7%. This looks like the main cause of the problem. 

Going forward, I will raise a request with back-end team to unstuck your PostgreSQL instance from the backend and will provide you an update. To resolve the issue, you must increase the number of CPU or upgrade instance machine type. 

You may want to go through Best Practices for data import on Cloud SQL 

Regards,

On Sunday, March 25, 2018 at 12:12:40 PM UTC-4, Stéphane Colzy wrote:
Hi,

I tried to import a 115GB database sql dump into this instance and all went well until it got stuck at 99GB storage usage.
Then I tried to restart it and now it's stuck.

However, this brand new instance had 300GB of storage allocated.

can someone help ?
thx
Stephane

--
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/2d0f0da6-083e-4605-b93c-ec7f958f347e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] 2 generation sql import sql data

i tried to import sql data in 2 generation sql on my cloud server and give to me a error, when i do it in 1 generation works fine any help ?
thanks.
fran.

--
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/bafcfa98-8e6e-4857-bd9c-c209261bf7a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] does DriverManager in server side useless in the cloud 2gen SQL?

Hey ,I using android studio with java calling an app-engine endpoints  within the app ,and  in the endpoint I need to call my cloud SQL 2gen and return the result back to the app.

In the 1gen i used DriverManager in the server side , I also placing the ( User,Pass) within the DriverManager.

now I a little puzzled about the new way to combine the 2gen SQL with my appengine server side and my app.

in this tutorial i see that i need to fill ( user, pass ) in the pom.xml and in the appengine-web.xml ?  , is there's any one who can makes it more clear  to me about the process , maybe there's a code sample?

thanks.







--
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/8f924017-495e-4d93-8fc5-b16db15aa10b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunday, March 25, 2018

[google-cloud-sql-discuss] Re: PostgreSQL instance stalled at 99GB while importing and now stuck on restart

Hi Stephane,

I observed your instance CPU utilization is hitting around 99.7%. This looks like the main cause of the problem. 

Going forward, I will raise a request with back-end team to unstuck your PostgreSQL instance from the backend and will provide you an update. To resolve the issue, you must increase the number of CPU or upgrade instance machine type. 

You may want to go through Best Practices for data import on Cloud SQL 

Regards,

On Sunday, March 25, 2018 at 12:12:40 PM UTC-4, Stéphane Colzy wrote:
Hi,

I tried to import a 115GB database sql dump into this instance and all went well until it got stuck at 99GB storage usage.
Then I tried to restart it and now it's stuck.

However, this brand new instance had 300GB of storage allocated.

can someone help ?
thx
Stephane

--
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/d9b48845-5a61-4955-973d-b909f51916fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] PostgreSQL instance stalled at 99GB while importing and now stuck on restart

Hi,

I tried to import a 115GB database sql dump into this instance and all went well until it got stuck at 99GB storage usage.
Then I tried to restart it and now it's stuck.

However, this brand new instance had 300GB of storage allocated.

can someone help ?
thx
Stephane

--
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/4dfc9422-8400-4e25-aefc-25a27e448ee7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, March 24, 2018

[google-cloud-sql-discuss] Re: CloudSQL connection issues with deployed Bookshelf tutorial app (App Engine/NodeJS)

Hi Dinesh,

For the technical query, debugging and troubleshooting Stack overflow and Server fault communities are better suited. Google Group is meant for general project and service related discussions. You may want to review community support document to have a better idea which community is better suited for your query. I understand stack overflow is better suited for this query. 

Having said that, you may try troubleshooting suggestions provided on this thread for a somewhat similar issue. 

Regards,
 

On Saturday, March 24, 2018 at 12:59:34 PM UTC-4, Dinesh Kumar wrote:
i deployed the my code on app engine with node js (flex environment). 
 ==========================================
config.json 

{
  "GCLOUD_PROJECT": "XXXXXX",
  "DATA_BACKEND": "cloudsql",
  "MYSQL_USER": "XXXX",
  "MYSQL_PASSWORD": "XXXXX",
  "INSTANCE_CONNECTION_NAME": "XXXXXX:us-central1:XXXXX"
}

===============================================================
model-cloudsql.js

const options = {
  user: config.get('MYSQL_USER'),
  password: config.get('MYSQL_PASSWORD'),
  database: 'XXXXX'
};

if (config.get('INSTANCE_CONNECTION_NAME') && config.get('NODE_ENV') === 'production') {
  options.socketPath = `/cloudsql/${config.get('INSTANCE_CONNECTION_NAME')}`;

}

const connection = mysql.createConnection(options);


i am getting the error : "Cannot enqueue Query after fatal error."

please provides any feedback on it. 

--
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/ba193a38-dcd5-4898-a9c8-25640f3def9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

I know you mentioned to have "Project IAM Admin" role above, but please verify that again too. 
Having said that only "Owner" and "Project IAM Admin" (under "Resource Manager") have the privilege to grant a role to a service account.  If you have one of these roles and still getting different output from IAM Dashboard and "gcloud iam service-accounts get-iam-policy" command for concerned service account role, I will suggest raising this as a bug on Google public issue tracker which meant for issues and feature request tracking. 

On Friday, March 23, 2018 at 1:30:33 PM UTC-4, James Lampert wrote:
And I just tried removing and re-granting the role, from the IAM Dashboard. No change.

--
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/a3f57ff0-fd6a-4c4e-8f13-4123ba90cae2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] CloudSQL connection issues with deployed Bookshelf tutorial app (App Engine/NodeJS)

i deployed the my code on app engine with node js (flex environment). 
 ==========================================
config.json 

{
  "GCLOUD_PROJECT": "XXXXXX",
  "DATA_BACKEND": "cloudsql",
  "MYSQL_USER": "XXXX",
  "MYSQL_PASSWORD": "XXXXX",
  "INSTANCE_CONNECTION_NAME": "XXXXXX:us-central1:XXXXX"
}

===============================================================
model-cloudsql.js

const options = {
  user: config.get('MYSQL_USER'),
  password: config.get('MYSQL_PASSWORD'),
  database: 'XXXXX'
};

if (config.get('INSTANCE_CONNECTION_NAME') && config.get('NODE_ENV') === 'production') {
  options.socketPath = `/cloudsql/${config.get('INSTANCE_CONNECTION_NAME')}`;

}

const connection = mysql.createConnection(options);


i am getting the error : "Cannot enqueue Query after fatal error."

please provides any feedback on it. 

--
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/f8ffc157-8b6e-426e-8f5e-cf5da6f457ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, March 23, 2018

[google-cloud-sql-discuss] Re: explicit_defaults_for_timestamp

Hi Ed,


Thank you for your message. Indeed, there is no supported flag in CloudSQL for MySQL which can cause the issue to be resolved. However, I would suggest you log a feature request in the public issue tracker for enabling explicit_defaults_for_timestamp flag to customers.

--
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/74548f39-2159-4ebb-9c3a-1ba774bea6da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

And I just tried removing and re-granting the role, from the IAM Dashboard. No change.

--
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/1a83b6d1-78c9-41db-8f05-fddcea3f328b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

On Thursday, March 22, 2018 at 7:15:12 PM UTC-7, Dinesh (Google Platform Support) wrote:
It would be worth to verify your service account has "Cloud SQL Client" access in IAM and "Cloud SQL API" has been enabled correctly. Suggestions provided here resolved a similar issue in the past. 

As Captain Kirk so pithily said, "This is damn peculiar."

According to the "IAM Dashboard," the service accounts have "Cloud SQL Client":

But according to the "Service Accounts" tab, and according to gcloud . . . get-iam-policy, they have NOTHING:

Jamess-Mac-mini:~ jamesl$ gcloud iam service-accounts get-iam-policy REDACTED-service@REDACTED.iam.gserviceaccount.com

etag: ACAB



Updates are available for some Cloud SDK components.  To install them,

please run:

  $ gcloud components update


Jamess-Mac-mini:~ jamesl$ gcloud iam service-accounts get-iam-policy REDACTED-compute@developer.gserviceaccount.com

etag: ACAB


 That could explain what's going on with the proxy, but can somebody explain why I'm getting contradictory information here?

--
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/eee23d91-9892-4fbb-a129-ec57d2d55d21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] explicit_defaults_for_timestamp

In a Google Cloud SQL 2nd generation instance, I cannot find any way to disable the peculiar MySQL treatment of timestamp fields.  These legacy peculiarities are being deprecated in MySQL, and a warning is logged upon startup of the instance:

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details)."  

However, there does not seem to be any flag in Cloud SQL to cause this flag to be passed.  Trying to change the setting at the individual session level with SET SESSION does not work either, because changing that session variable requires SUPER privileges and Cloud SQL does not support those either.  Is there no way to disable the deprecated semantics of timestamp fields in Cloud SQL ?

--
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/b236acf3-f4f9-4759-9376-50f0202838e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, March 22, 2018

[google-cloud-sql-discuss] Re: I can connect the Proxy from my account, but not from either of two service accounts that should also have access.

It would be worth to verify your service account has "Cloud SQL Client" access in IAM and "Cloud SQL API" has been enabled correctly. Suggestions provided here resolved a similar issue in the past. 

On Thursday, March 22, 2018 at 1:43:49 PM UTC-4, James Lampert wrote:
In all three cases, the proxy starts, and is waiting for connections. If I'm running the proxy as myself, I can connect just fine, whether from the default MySQL client, or from Sequel Pro, or from Squirrel. But if I'm running the proxy from either the default service account, or a service account I created specifically for this, the client gets:
MySQL said: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
and the proxy shows: 
2018/03/22 09:38:23 New connection for "<REDACTED>"
2018/03/22 09:38:24 couldn't connect to "<REDACTED>": ensure that the account has access to "<REDACTED>" (and make sure there's no typo in that name). Error during createEphemeral for <REDACTED>: googleapi: Error 403: Access Not Configured. Cloud SQL Administration API has not been used in project 773874261491 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sqladmin.googleapis.com/overview?project=<REDACTED> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured

I have:
Cloud SQL Admin
Cloud SQL Client
Compute Instance Admin (v1)
Compute Network Admin
Compute Security Admin
Deployment Manager Editor
Service Account Actor
Service Account Admin
Service Account Key Admin
Project IAM Admin
Storage Admin

The default service account has:
Cloud SQL Client
Editor

The service account I created has:
Cloud SQL Client 

At a suggestion to try re-enabling the Cloud SQL API, I had it disabled and re-enabled. No change. Still:

Jamess-Mac-mini:~ jamesl$ ./cloud_sql_proxy -instances=<REDACTED>=tcp:3306
2018/03/22 09:37:42 Listening on 127.0.0.1:3306 for <REDACTED>
2018/03/22 09:37:42 Ready for new connections
{Sequel Pro connected just fine}
2018/03/22 09:37:50 New connection for "<REDACTED>"
2018/03/22 09:37:52 New connection for "<REDACTED>"
2018/03/22 09:38:01 Client closed local connection on 127.0.0.1:3306
2018/03/22 09:38:01 Client closed local connection on 127.0.0.1:3306
^C
Jamess-Mac-mini:~ jamesl$ ./cloud_sql_proxy -instances=<REDACTED>=tcp:3306 -credential_file=<REDACTED my new service account>.json
2018/03/22 09:38:19 using credential file for authentication; email=<REDACTED my new service account>
2018/03/22 09:38:19 Listening on 127.0.0.1:3306 for <REDACTED>
2018/03/22 09:38:19 Ready for new connections
{Sequel Pro failed to connect}
2018/03/22 09:38:23 New connection for "<REDACTED>"
2018/03/22 09:38:24 couldn't connect to "<REDACTED>": ensure that the account has access to "<REDACTED>" (and make sure there's no typo in that name). Error during createEphemeral for <REDACTED>: googleapi: Error 403: Access Not Configured. Cloud SQL Administration API has not been used in project 773874261491 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sqladmin.googleapis.com/overview?project=<REDACTED> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
^C
Jamess-Mac-mini:~ jamesl$ ./cloud_sql_proxy -instances=<REDACTED>=tcp:3306 -credential_file=<REDACTED default service account>.json
2018/03/22 09:46:41 using credential file for authentication; email=<REDACTED default service account>
2018/03/22 09:46:41 Listening on 127.0.0.1:3306 for <REDACTED>
2018/03/22 09:46:41 Ready for new connections
{Sequel Pro failed to connect}
2018/03/22 09:46:45 New connection for "<REDACTED>"
2018/03/22 09:46:46 couldn't connect to "<REDACTED>": ensure that the account has access to "<REDACTED>" (and make sure there's no typo in that name). Error during createEphemeral for <REDACTED>: googleapi: Error 403: Access Not Configured. Cloud SQL Administration API has not been used in project <REDACTED> before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sqladmin.googleapis.com/overview?project=<REDACTED> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry., accessNotConfigured
^C

--
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/38252ca9-e64c-497c-bf7b-7eba02676004%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.