Tuesday, February 28, 2017

Re: [google-cloud-sql-discuss] Can not change scheduled backup time

I'm looking..

On Saturday, February 25, 2017 at 8:21:35 AM UTC+7, David Newgas wrote:
Hi,

It looks like this instance has got in some bad state internally. I'm looking to see if we can get it back into a good state and find out how this happened.

David

On Wed, Feb 22, 2017 at 7:35 PM, Huy Nguyen <huyn...@gmail.com> wrote:
Hi David,

I using 1st Generation.. 
I execute cmd Operation and received:

25d15755-a918-4a49-b359-4d5b8a9b6e57  RESTART          2017-02-21T18:31:27.186+00:00  2017-02-21T18:31:27.186+00:00  -               DONE
43ff967d-5e5c-417e-ad1c-a28319848e3e  DELETE_USER      2016-11-30T08:19:57.705+00:00  2016-11-30T08:19:57.705+00:00  -               DONE
af971718-7860-4e90-9dcf-8c100a54ebad  DELETE_USER      2016-11-30T08:19:57.176+00:00  2016-11-30T08:19:57.176+00:00  -               DONE
8f87ce40-db99-4b4d-a032-f59a023916ca  BACKUP_VOLUME    2016-11-29T18:10:34.585+00:00  2016-11-29T18:23:53.177+00:00  -               DONE
010d96a6-c15b-4082-8a82-f4fe61ba8fab  BACKUP_VOLUME    2016-11-28T15:40:31.485+00:00  2016-11-28T15:54:47.768+00:00  -               DONE

You can show lastest BACKUP_VOLUME  completed is 2016-11-30. I don't known why is stoped.. I want this continue.
I will sent private message for you my project id.

Tks,


On Thursday, February 23, 2017 at 12:43:12 AM UTC+7, David Newgas wrote:
Hi,

Cloud SQL backups are an internal disk snapshot and cannot be downloaded to local storage. If you want to get a local copy of your database (or store a copy in GCS so that cloud-based backups last more than 7 days) you should use the export feature.

If you want advice on the operation, please run "gcloud --project=YOUR_PROJECT sql operations list --instance=YOUR_INSTANCE_NAME" (or look at operations on your instance in the Cloud Console) to find what operation is still running. Use "gcloud --project=YOUR_PROJECT sql operations describe INSTANCE_ID --instance=YOUR_INSTANCE_NAME" to get more details on the still-running operation. If you share this information with us we might be able to figure out what's going on with the operation.

It would also be helpful to know if this is a 1st Generation or 2nd Generation instance.

David

On Tue, Feb 21, 2017 at 6:43 PM, Huy Nguyen <huyn...@gmail.com> wrote:
Hi guy,

I using GAE 1 year ago.. I want backup my cloud sql to local but can not show recent backup.. (total storage capacity of about 20G)

I want edit my sql instance config (Edit backup time, add authorized networks..) but all attempts to change were unsuccessful. I received message 

"Operation failed because another operation was already in progress". 

I tried restarting but remain so.. Plz help me solve this problem. Tks


--
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/97e34e7a-b05a-493f-8f9a-6482805eaf0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/19d962e2-c47e-48f8-a22e-8e0b4a704155%40googlegroups.com.

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

--
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/581fb9a7-5f77-4503-b587-7df3af853102%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Cannot Connect by Cloud SQL Proxy from Cloud Shell By Proxy

We are working to make sure that Cloud SQL Client gives sufficient permissions for the Cloud SQL Proxy to operate. In the mean time you will need to give it the viewer permission too.

David

On Tue, Feb 28, 2017 at 8:44 AM, Patrick Decat <pdecat@gmail.com> wrote:
Hi,

I had the same 403 issue until I added the "Cloud SQL Viewer" role.

On Friday, February 17, 2017 at 6:33:21 PM UTC+1, David Newgas wrote:
 
... Basically I tihnk you might need to give your service account the "Cloud SQL Viewer" role in addition to "Cloud SQL Client". 
As we document that only the client role is necessary, I'm going to see if there is a docs issue or a code issue too.


This is clearly an issue with the documentation:

> Required permissions for service accounts
> When you use a service account to provide the credentials for the proxy, you must create it with sufficient permissions.
> If you are using the finer-grained Identity Access and Management (IAM) roles to manage your Cloud SQL permissions, you must give the service account the Cloud SQL Client role.

--
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/dc8b55f5-d806-44f7-ac29-875983b9f3de%40googlegroups.com.

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

--
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/CAJZK_bYHhjUp%3Dnxt-cXD%2BwUAq8y4fc7VsYjJTeHY8Dvz88RBLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Cannot Connect by Cloud SQL Proxy from Cloud Shell By Proxy

Hi,

I had the same 403 issue until I added the "Cloud SQL Viewer" role.

On Friday, February 17, 2017 at 6:33:21 PM UTC+1, David Newgas wrote:
 
... Basically I tihnk you might need to give your service account the "Cloud SQL Viewer" role in addition to "Cloud SQL Client". 
As we document that only the client role is necessary, I'm going to see if there is a docs issue or a code issue too.


This is clearly an issue with the documentation:

> Required permissions for service accounts
> When you use a service account to provide the credentials for the proxy, you must create it with sufficient permissions.
> If you are using the finer-grained Identity Access and Management (IAM) roles to manage your Cloud SQL permissions, you must give the service account the Cloud SQL Client role.

cf. https://cloud.google.com/sql/docs/mysql/sql-proxy#authentication-options 

--
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/dc8b55f5-d806-44f7-ac29-875983b9f3de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, February 27, 2017

[google-cloud-sql-discuss] Increased rate of "MySQL server has gone away" errors

Hello,

As of today we're seeing an increased rate of "MySQL server has gone away" errors when connecting to our Cloud SQL 2G instance. Prior to today we might see this error once every few months, but today we've seen it 6 times according to App Engine Error Reporting and 18 times according to our App Engine logs. 

I do not see an update operation on our instance, so any thoughts on where to start looking would be greatly appreciated.

Best,
Geoff.


--
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/f1c6b105-674e-4096-8c05-50ca7b03a319%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] OT: Google App Engine group requires Google Plus profile

Thanks David, I'm in!




On Mon, Feb 27, 2017 at 1:30 PM, 'David Newgas' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Will do.

On Mon, Feb 27, 2017 at 10:59 AM, <geoffrey.arnold@gmail.com> wrote:
Hello,

Apologies for the off-topic post, but could an admin from this group kindly ask a Google App Engine group admin to disable the requirement of a Google Plus profile in order to join the group?

Thanks,
Geoff.

--
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/2da523b0-38d5-4aee-ad9a-bb75b5aad7da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAJZK_bbLT8%2BC5cK4Nr%2BsJbwJds5wNfGYDzkts471Pd5MNNJ0KA%40mail.gmail.com.

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

--
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/CAF38860BxD5W0u%2B5DjpZJz_r-CZ9ck2CvB1hGMQpizs5bmU5nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Cloud SQL Proxy no longer working in App Engine environment

Your app shouldn't be trying to connect to localhost in production. It should use the instance connection name. I can reproduce your issue though with the tutorial app, because it uses config.js to check if NODE_ENV is set to "production" to conditionally parse INSTANCE_CONNECTION_NAME. This is actually related to a different issue where NODE_ENV is not being respected in app.yaml for deployed apps.

In my case, the workaround was to manually set NODE_ENV to "production" in config.json.

On Friday, February 24, 2017 at 9:03:57 PM UTC-5, Jordan Cote wrote:

Sometime in the past few weeks an issue with Cloud SQL started to occur with the App Engine's Cloud SQL Proxy. I get the following error in the App Engine logs:

error when connecting to db: { Error: connect ECONNREFUSED 127.0.0.1:3306

The app works on my local machine with Cloud SQL Proxy, as does the counterpart app in Compute Cluster. It used to work in App Engine, too. I double checked the App Engine user's credentials are set to Editor.  I noticed that recently the App Engine parameter vm:true has been deprecated in favor of env: flex. I tried it both ways, with the same result. The following shows how I am connecting in Node.js:

var connection;

function handleDisconnect() {
  connection = mysql.createConnection({
    user: process.env.MYSQL_USER,
    password: process.env.MYSQL_PASSWORD,
    socketPath: process.env.MYSQL_SOCKET_PATH,
    database: process.env.MYSQL_DATABASE
  });                                             // Recreate the connection, since
                                                  // the old one cannot be reused.

  connection.connect(function(err) {              // The server is either down
    if(err) {                                     // or restarting (takes a while sometimes).
      console.log('error when connecting to db:', err);
      setTimeout(handleDisconnect, 2000); // We introduce a delay before attempting to reconnect,
    }                                     // to avoid a hot loop, and to allow our node script to
  });                                     // process asynchronous requests in the meantime.
                                          // If you're also serving http, display a 503 error.
  connection.on('error', function(err) {
    console.log('db error', err);
    if(err.code === 'PROTOCOL_CONNECTION_LOST') { // Connection to the MySQL server is usually
      handleDisconnect();                         // lost due to either server restart, or a
    } else {                                      // connnection idle timeout (the wait_timeout
      throw err;                                  // server variable configures this)
    }
  });
}

handleDisconnect();

I have the connection string as follows:
  INSTANCE_CONNECTION_NAME: /cloudsql/cybers-cafe:us-east1:cybers-cafe
and under beta_settings:
  cloud_sql_instances: cybers-cafe:us-east1:cybers-cafe

I also tried restarting the SQL server. It is in us-east1 and the instances are in us-east1-b/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/3fd3d315-bae1-4172-8ece-fadd36128716%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] OT: Google App Engine group requires Google Plus profile

Will do.

On Mon, Feb 27, 2017 at 10:59 AM, <geoffrey.arnold@gmail.com> wrote:
Hello,

Apologies for the off-topic post, but could an admin from this group kindly ask a Google App Engine group admin to disable the requirement of a Google Plus profile in order to join the group?

Thanks,
Geoff.

--
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/2da523b0-38d5-4aee-ad9a-bb75b5aad7da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAJZK_bbLT8%2BC5cK4Nr%2BsJbwJds5wNfGYDzkts471Pd5MNNJ0KA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] OT: Google App Engine group requires Google Plus profile

Hello,

Apologies for the off-topic post, but could an admin from this group kindly ask a Google App Engine group admin to disable the requirement of a Google Plus profile in order to join the group?

Thanks,
Geoff.

--
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/2da523b0-38d5-4aee-ad9a-bb75b5aad7da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Re: Debugging "Out of memory (Needed XXXXXXX bytes)" error

Has the issue resolved by - as you had mentioned earlier - changing the query to avoid COUNT(DISTINCT) or has it resolved by just the passing of time (that is, you can run the original query)?

If it's the former, determining the cause might help clarify why it's not working or how to make it work. If it's the latter, it might be difficult to determine the cause.

As for the data set, describing it roughly (tables involved, schema, etc.) and supplying the query would be the best way to go about allowing us to attempt a reproduction of the behaviour. Feel free to email me at paynen@google.com to supply that if you get the time.

Best of luck! 

Nick
Cloud Platform Community Support

On Monday, February 27, 2017 at 8:28:36 AM UTC-5, Ann Su wrote:
Hi,

you could say the data set is large (~10G) but the particular query that caused troubles is using a temporary table with just a fraction of the entire table. It is using JOIN but I'm 99% sure that we had the same error on a query with just a single, relatively small table.

Before migration to GC we had no issues with this even on much larger data sets. Since the application's codebase didn't change nor the dataset increased too much, the issue seems to be related to a) mysql settings b) version of mysql c) server setup - because that's what was changed as result of migration.

Since the issue seems to be resolved I can't spend too much time on this now but I'll try to prepare a test data set so it is easy to reproduce the issue and share it with you. 

best,
Ann

--
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/0bd161e1-7b3b-4e64-ad0c-b87869c8f7a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Re: Debugging "Out of memory (Needed XXXXXXX bytes)" error

Hi,

you could say the data set is large (~10G) but the particular query that caused troubles is using a temporary table with just a fraction of the entire table. It is using JOIN but I'm 99% sure that we had the same error on a query with just a single, relatively small table.

Before migration to GC we had no issues with this even on much larger data sets. Since the application's codebase didn't change nor the dataset increased too much, the issue seems to be related to a) mysql settings b) version of mysql c) server setup - because that's what was changed as result of migration.

Since the issue seems to be resolved I can't spend too much time on this now but I'll try to prepare a test data set so it is easy to reproduce the issue and share it with you. 

best,
Ann

--
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/583959b1-1dca-44fe-b066-f5a2c757f2e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunday, February 26, 2017

Re: [google-cloud-sql-discuss] Can not change scheduled backup time

I'm looking forward.. 

Tks guy,

On Saturday, February 25, 2017 at 8:21:35 AM UTC+7, David Newgas wrote:
Hi,

It looks like this instance has got in some bad state internally. I'm looking to see if we can get it back into a good state and find out how this happened.

David

On Wed, Feb 22, 2017 at 7:35 PM, Huy Nguyen <huyn...@gmail.com> wrote:
Hi David,

I using 1st Generation.. 
I execute cmd Operation and received:

25d15755-a918-4a49-b359-4d5b8a9b6e57  RESTART          2017-02-21T18:31:27.186+00:00  2017-02-21T18:31:27.186+00:00  -               DONE
43ff967d-5e5c-417e-ad1c-a28319848e3e  DELETE_USER      2016-11-30T08:19:57.705+00:00  2016-11-30T08:19:57.705+00:00  -               DONE
af971718-7860-4e90-9dcf-8c100a54ebad  DELETE_USER      2016-11-30T08:19:57.176+00:00  2016-11-30T08:19:57.176+00:00  -               DONE
8f87ce40-db99-4b4d-a032-f59a023916ca  BACKUP_VOLUME    2016-11-29T18:10:34.585+00:00  2016-11-29T18:23:53.177+00:00  -               DONE
010d96a6-c15b-4082-8a82-f4fe61ba8fab  BACKUP_VOLUME    2016-11-28T15:40:31.485+00:00  2016-11-28T15:54:47.768+00:00  -               DONE

You can show lastest BACKUP_VOLUME  completed is 2016-11-30. I don't known why is stoped.. I want this continue.
I will sent private message for you my project id.

Tks,


On Thursday, February 23, 2017 at 12:43:12 AM UTC+7, David Newgas wrote:
Hi,

Cloud SQL backups are an internal disk snapshot and cannot be downloaded to local storage. If you want to get a local copy of your database (or store a copy in GCS so that cloud-based backups last more than 7 days) you should use the export feature.

If you want advice on the operation, please run "gcloud --project=YOUR_PROJECT sql operations list --instance=YOUR_INSTANCE_NAME" (or look at operations on your instance in the Cloud Console) to find what operation is still running. Use "gcloud --project=YOUR_PROJECT sql operations describe INSTANCE_ID --instance=YOUR_INSTANCE_NAME" to get more details on the still-running operation. If you share this information with us we might be able to figure out what's going on with the operation.

It would also be helpful to know if this is a 1st Generation or 2nd Generation instance.

David

On Tue, Feb 21, 2017 at 6:43 PM, Huy Nguyen <huyn...@gmail.com> wrote:
Hi guy,

I using GAE 1 year ago.. I want backup my cloud sql to local but can not show recent backup.. (total storage capacity of about 20G)

I want edit my sql instance config (Edit backup time, add authorized networks..) but all attempts to change were unsuccessful. I received message 

"Operation failed because another operation was already in progress". 

I tried restarting but remain so.. Plz help me solve this problem. Tks


--
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/97e34e7a-b05a-493f-8f9a-6482805eaf0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/19d962e2-c47e-48f8-a22e-8e0b4a704155%40googlegroups.com.

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

--
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/8805881f-9342-4ca1-8f48-2b2a60586f06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, February 25, 2017

[google-cloud-sql-discuss] Cloud SQL Hung in Maintenance Mode for hours

We have cloud MySQL instance which end up hung in Maintenance mode while we try to spin up the database.

What steps will reproduce the problem?  1.Click "Edit" to change the Google SQL instance "ODS" at Google SQL Console  2.Select the highest specification   3.Click "Save and Restart"    What is the name of your database instance?  ODS    What is the expected output? What do you see instead?  Update Operation completed, ODS instance have highest specification.  However, i saw "ODS" having "Under Maintenance" status and ODS instance stopped servicing.  

Please can anyone advice? It's kind of critical


Disclaimer:

This email and any files transmitted with it are confidential and may be privileged. It is intended solely for the above addressee. If you have received it in error please delete it and notify the sender. The unauthorised use, disclosure, copying, alteration or dissemination of any information in this e-mail is strictly forbidden. AirAsia accepts no liability whatsoever that may arise from or in connection with this e-mail and/or its contents.

--
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/b3ce7c37-7e34-45e9-93f6-3c34e47f8909%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, February 24, 2017

[google-cloud-sql-discuss] Cloud SQL Proxy no longer working in App Engine environment


Sometime in the past few weeks an issue with Cloud SQL started to occur with the App Engine's Cloud SQL Proxy. I get the following error in the App Engine logs:

error when connecting to db: { Error: connect ECONNREFUSED 127.0.0.1:3306

The app works on my local machine with Cloud SQL Proxy, as does the counterpart app in Compute Cluster. It used to work in App Engine, too. I double checked the App Engine user's credentials are set to Editor.  I noticed that recently the App Engine parameter vm:true has been deprecated in favor of env: flex. I tried it both ways, with the same result. The following shows how I am connecting in Node.js:

var connection;

function handleDisconnect() {
  connection = mysql.createConnection({
    user: process.env.MYSQL_USER,
    password: process.env.MYSQL_PASSWORD,
    socketPath: process.env.MYSQL_SOCKET_PATH,
    database: process.env.MYSQL_DATABASE
  });                                             // Recreate the connection, since
                                                  // the old one cannot be reused.

  connection.connect(function(err) {              // The server is either down
    if(err) {                                     // or restarting (takes a while sometimes).
      console.log('error when connecting to db:', err);
      setTimeout(handleDisconnect, 2000); // We introduce a delay before attempting to reconnect,
    }                                     // to avoid a hot loop, and to allow our node script to
  });                                     // process asynchronous requests in the meantime.
                                          // If you're also serving http, display a 503 error.
  connection.on('error', function(err) {
    console.log('db error', err);
    if(err.code === 'PROTOCOL_CONNECTION_LOST') { // Connection to the MySQL server is usually
      handleDisconnect();                         // lost due to either server restart, or a
    } else {                                      // connnection idle timeout (the wait_timeout
      throw err;                                  // server variable configures this)
    }
  });
}

handleDisconnect();

I have the connection string as follows:
  INSTANCE_CONNECTION_NAME: /cloudsql/cybers-cafe:us-east1:cybers-cafe
and under beta_settings:
  cloud_sql_instances: cybers-cafe:us-east1:cybers-cafe

I also tried restarting the SQL server. It is in us-east1 and the instances are in us-east1-b/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/6c45aea8-8bc2-433d-ad53-7a7380169b1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Can not change scheduled backup time

Hi,

It looks like this instance has got in some bad state internally. I'm looking to see if we can get it back into a good state and find out how this happened.

David

On Wed, Feb 22, 2017 at 7:35 PM, Huy Nguyen <huynq2207@gmail.com> wrote:
Hi David,

I using 1st Generation.. 
I execute cmd Operation and received:

25d15755-a918-4a49-b359-4d5b8a9b6e57  RESTART          2017-02-21T18:31:27.186+00:00  2017-02-21T18:31:27.186+00:00  -               DONE
43ff967d-5e5c-417e-ad1c-a28319848e3e  DELETE_USER      2016-11-30T08:19:57.705+00:00  2016-11-30T08:19:57.705+00:00  -               DONE
af971718-7860-4e90-9dcf-8c100a54ebad  DELETE_USER      2016-11-30T08:19:57.176+00:00  2016-11-30T08:19:57.176+00:00  -               DONE
8f87ce40-db99-4b4d-a032-f59a023916ca  BACKUP_VOLUME    2016-11-29T18:10:34.585+00:00  2016-11-29T18:23:53.177+00:00  -               DONE
010d96a6-c15b-4082-8a82-f4fe61ba8fab  BACKUP_VOLUME    2016-11-28T15:40:31.485+00:00  2016-11-28T15:54:47.768+00:00  -               DONE

You can show lastest BACKUP_VOLUME  completed is 2016-11-30. I don't known why is stoped.. I want this continue.
I will sent private message for you my project id.

Tks,


On Thursday, February 23, 2017 at 12:43:12 AM UTC+7, David Newgas wrote:
Hi,

Cloud SQL backups are an internal disk snapshot and cannot be downloaded to local storage. If you want to get a local copy of your database (or store a copy in GCS so that cloud-based backups last more than 7 days) you should use the export feature.

If you want advice on the operation, please run "gcloud --project=YOUR_PROJECT sql operations list --instance=YOUR_INSTANCE_NAME" (or look at operations on your instance in the Cloud Console) to find what operation is still running. Use "gcloud --project=YOUR_PROJECT sql operations describe INSTANCE_ID --instance=YOUR_INSTANCE_NAME" to get more details on the still-running operation. If you share this information with us we might be able to figure out what's going on with the operation.

It would also be helpful to know if this is a 1st Generation or 2nd Generation instance.

David

On Tue, Feb 21, 2017 at 6:43 PM, Huy Nguyen <huyn...@gmail.com> wrote:
Hi guy,

I using GAE 1 year ago.. I want backup my cloud sql to local but can not show recent backup.. (total storage capacity of about 20G)

I want edit my sql instance config (Edit backup time, add authorized networks..) but all attempts to change were unsuccessful. I received message 

"Operation failed because another operation was already in progress". 

I tried restarting but remain so.. Plz help me solve this problem. Tks


--
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/97e34e7a-b05a-493f-8f9a-6482805eaf0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/19d962e2-c47e-48f8-a22e-8e0b4a704155%40googlegroups.com.

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

--
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/CAJZK_bbbwwqdkAyMD3VQoN4wUsB-xSFh0vshRmdbc68OzVHwXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Re: Major change to InnoDB Pages Written after update

Hey Geoffrey,

To check whether there's any process running which might be responsible for the approx 1 page-write/s rate, you could see about running "SHOW FULL PROCESSLIST\G" during those times with zero user activity and yet a 1 page-write/s rate reporting.

This Q&A on the DBA Stack Exchange site has an excellent reply examining all the different possible sources of writes in the InnoDB engine.

Running "SHOW ENGINE INNODB STATUS;" during the times with zero user activity and yet a 1 page-write/s rate reporting could also be useful in analyzing what's happening. 

Feel free to analyze the results of your investigations alone or send them along via replying to that same email I had sent. I'd be very interested to take a look at the data.

I'll be taking a look to see if I can learn more about what the update contained, and to what extent it could have contributed to this. At any rate, one page write per second is nothing that will impact performance on your app, so there's nothing to worry about in the meantime.

Cheers,

Nick
Cloud Platform Community Support



On Friday, February 24, 2017 at 12:38:25 PM UTC-5, Geoffrey Arnold wrote:
Thanks for taking a look. The largest table on this instance is about 6K rows and 19MB in size. 

I already replied to your other email, but just ran SHOW TABLE STATUS on each of the schemas. I'll include that output in the other thread.




On Thu, Feb 23, 2017 at 5:38 PM, 'paynen' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hey Geoffrey,

There are many moving parts involved in the InnoDB engine which might lead to an increase or decrease of page writes. Without knowing anything more about your system, it's hard to say what might be the cause.

I've sent an email to you through our support portal to request your Project ID and the instance name so we can see about taking a closer look at what update was applied. You may want to also gather information about the sizes of your tables, the kinds of queries run, the frequencies with which they're run, etc. for your reply.

I'll be happy to post here any further progress we make as we look into this.

Cheers, 

On Thursday, February 23, 2017 at 12:06:58 PM UTC-5, geoffrey.arnold@gmail.com wrote:
Hello,

It appears that on February 4 at 11:13 PM CT our Cloud SQL instance received an update. Since then we've seen a major change to the InnoDB Pages Written metric. Screenshots attached. Any help with where to begin troubleshooting would be greatly appreciated.

Thanks in advance,
Geoff.



--
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/0c57b551-be97-478e-9f87-1146506f0055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/e7db948c-4435-4387-9976-042dd5721576%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: SQL Backup running Blocked

If you send me a private message with your project id I will look into the stuck operation. There is no user-facing way to cancel an operation in progress short of deleting the instance.

On Tuesday, February 21, 2017 at 9:02:16 AM UTC-5, Brintel Tecnologia wrote:
Yes, I have full permission. How do I change the status of an SQL operation?

It seems that when there is a running operation, I can not make any changes.

Ex:
"name": "127ad01f-f33a-4b97-9c9e-1079ddef47ae",
"operationType": "BACKUP_VOLUME",
"status": "RUNNING",
"insertTime": "2017-02-11T04:46:59.646Z",
"startTime": "2017-02-11T04:46:59.856Z



Em segunda-feira, 20 de fevereiro de 2017 17:36:33 UTC-3, Adam (Cloud Platform Support) escreveu:
You need to have at least the cloudsql.editor role or project editor permissions in order to perform this operation. Are you able to confirm your level of access in the project?

On Sunday, February 19, 2017 at 4:29:18 PM UTC-5, Brintel Tecnologia wrote:
I'm trying to change the MySQL timezone and I can not. 

MSG:

ERROR: (gcloud.sql.instances.patch) You do not have permission to access instance [bd-brintel-soft-01] (or it may not exist): Operation failed because another operation was already in progress.

COMMAND USED:

gcloud sql instances patch bd-brintel-soft-01 --database-flags default_time_zone=-03:00

LIST OF OPERATIONS OF THE INSTANCE:

gcloud sql operations list --instance=bd-brintel-soft-01, -i bd-brintel-soft-01OPERATION TYPE START END ERROR STATUS4d9862a0-42af-4316-9690-ad8a834118aa DELETE_BACKUP 2017-02-19T20:24:43.750+00:00 2017-02-19T20:24:56.432+00:00 - DONE582679fe-b3c7-4227-9adc-6b3affa58475 RESTART 2017-02-19T18:19:48.617+00:00 2017-02-19T18:20:00.677+00:00 - DONEbd10103e-6d5d-44ee-be96-3eaad8d18079 RESTART 2017-02-19T18:15:59.247+00:00 2017-02-19T18:16:27.811+00:00 - DONE127ad01f-f33a-4b97-9c9e-1079ddef47ae BACKUP_VOLUME 2017-02-11T04:46:59.856+00:00 T - RUNNING

This operation "127ad01f-f33a-4b97-9c9e-1079ddef47ae" Type "BACKUP_VOLUME" It has been running since 11/02/2017.

How to kill or remove this operation?

--
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/0beb1901-b6fc-4878-9e9e-ea4886b0054a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Can only get proxy service account to work when

The fact that you can always connect to CloudSQL from public networks indicates that the the service is working and able to accept client connections. The issue manifests itself only on your network, so a local misconfiguration, quite likely a firewall setting, is preventing connection to Google Cloud services. 

The current forum is meant for general questions related to the CloudSQL service. For non-related technical issues, you are likely to get more specialized and targeted help on dedicated forums, such as http://serverfault.com/ . We encourage you to seek advice there. 

--
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/0feb46cd-218a-48a0-87af-64c784e9c375%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Re: Major change to InnoDB Pages Written after update

Thanks for taking a look. The largest table on this instance is about 6K rows and 19MB in size. 

I already replied to your other email, but just ran SHOW TABLE STATUS on each of the schemas. I'll include that output in the other thread.




On Thu, Feb 23, 2017 at 5:38 PM, 'paynen' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hey Geoffrey,

There are many moving parts involved in the InnoDB engine which might lead to an increase or decrease of page writes. Without knowing anything more about your system, it's hard to say what might be the cause.

I've sent an email to you through our support portal to request your Project ID and the instance name so we can see about taking a closer look at what update was applied. You may want to also gather information about the sizes of your tables, the kinds of queries run, the frequencies with which they're run, etc. for your reply.

I'll be happy to post here any further progress we make as we look into this.

Cheers, 

On Thursday, February 23, 2017 at 12:06:58 PM UTC-5, geoffrey.arnold@gmail.com wrote:
Hello,

It appears that on February 4 at 11:13 PM CT our Cloud SQL instance received an update. Since then we've seen a major change to the InnoDB Pages Written metric. Screenshots attached. Any help with where to begin troubleshooting would be greatly appreciated.

Thanks in advance,
Geoff.



--
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/0c57b551-be97-478e-9f87-1146506f0055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAF388627yms1wQrioMT%2B3px%2BCvSjQN4%3DDy%2BEgskR4Np5gi5wpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] Re: Debugging "Out of memory (Needed XXXXXXX bytes)" error

Hey Ann,

Do you have a particularly large dataset that the query might be running on? Or, despite its simplicity, does it contain a lot of JOINs, perhaps? You might want to check the output of running "EXPLAIN <query>\G" when logged into the mysql client, to view the query plan.

I'm thinking that it might be the case that the error for requesting (and failing) an allocation of 2.5G could be coming from a sub-unit of computation part of the overall query plan, which up til that point, had consumed > 49.5 G (which seems only possible to explain with large datasets).

There may be another more obscure cause for this, and I'll read back over the mechanics of COUNT(distinct) to see how it might be contributing in this case.

Cheers,

Nick
Cloud Platform Community Support

On Thursday, February 23, 2017 at 8:51:41 PM UTC-5, Ann Su wrote:
Nick,

I had this issue on a server that was set up specifically for testing, no traffic/stress except of test queries. And I was adding more and more memory to the instance and still had exactly the same error, with exactly the same memory limit. 

I will need to set up a controlled environment for testing and see if your theory that the table is dumped to disk is right by checking the amount of created temporary tables on disk but it seems unlikely as the queries are running normally. Not too mention that these are not overly complex queries and the entire issue only happens with count(distinct).

thanks for your help!
Ann



On Thu, Feb 23, 2017 at 11:40 PM, 'paynen' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hey Ann Su,

After some short research I believe we can refine our theory behind this behaviour. When the system sees a temp table exceeding the size given by the system variables, it will convert from the MEMORY engine to a disk storage engine (probably MyISAM). From the MySQL manual:

The maximum size of internal in-memory temporary tables. This variable does not apply to user-created MEMORY tables.

The actual limit is determined from whichever of the values of tmp_table_size and max_heap_table_size is smaller. If an in-memory temporary table exceeds the limit, MySQL automatically converts it to an on-disk temporary table. As of MySQL 5.7.5, theinternal_tmp_disk_storage_engine option defines the storage engine used for on-disk temporary tables. Prior to MySQL 5.7.5, the MyISAM storage engine is used.

I had figured that an allocation error would be thrown, hence why you saw the error above. Instead, it will switch to disk storage.

The reason I say this explains the behaviour is because in lowering the size of temporary tables, you lowered the demands on memory each query will take. It's likely that you had many queries and connections using up instance memory when the failing query was run, which meant that of the total memory (52 G), it didn't have enough - due to the competition of the other queries/connections - to allocate a needed 2.5 G. In lowering the threshold for conversion of temp tables to disk storage, you lowered the stress put on memory storage.

Let me know if you have any further questions. I'll be happy to assist.

Cheers,

Nick
Cloud Platform Community Support

On Thursday, February 23, 2017 at 8:06:51 AM UTC-5, Ann Su wrote:
Hi Nick,

yes, I DECREASED the values. Initially, I had max_heap_table_size and tmp_table_size set to maximum possible value. 

There is an old bug filed related to "out of memory" and "count(distinct)" on mysql site:


Someone in the thread mentioned that it helped him to reduce max_heap_table_size and tmp_table_size (at least that's how I interpreted his answer) to avoid allocating more memory that system can handle.

That would lead me to two conclusions

1) there could be a bug causing misallocation of memory (too much of it) to perform count(distinct)
2) there could be a configuration issue on your servers that disallows allocating more memory than 2.5G 

which were to some extent confirmed by the fact, that decreasing the limits actually helped me.

cheers,
Lukasz


On Thu, Feb 23, 2017 at 12:21 AM, 'paynen' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hey Ann Su,

Thanks for keeping us updated with your findings. The issue seems to rest entirely on max_heap_table_size and tmp_table_size, since these are used to limit the size that internal in-memory temporary tables - the kind needed to run queries - can grow to. But I'm a bit confused at this point - did you decrease these values, or increase them? It seems like you're saying you decreased them, which ought to cause the error more frequently by limiting even further the size which the system can allocate to run queries.

Cheers,

Nick
Cloud Platform Community Support

On Monday, February 20, 2017 at 6:27:26 AM UTC-5, Ann Su wrote:
UPDATE 2:

It seems that the error also disappears after reducing the session size of tmp_table_size and max_heap_table_size.

Still, I don't understand why can't the system allocate more than 2,5GB on 52GB machine.

cheers,
Ann


On Monday, February 20, 2017 at 11:19:20 AM UTC+1, Ann Su wrote:
UPDATE:

Actually, all the queries are related to use of DISTINCT and removing it from query makes the "out of memory error" vanish. However, DISTINCT is used for a reason, so we can remove it.

Ann



On Monday, February 20, 2017 at 10:48:58 AM UTC+1, Ann Su wrote:
Hi Nick,

there are several queries that are causing problems. I believe this could be related to some kind of sorting ("group by", "distinct" etc.) and small buffer sizes. The table is using myisam for performance reasons.

The instance has 52 GB of memory.
The full error is:

{
 textPayload: "2017-02-20T09:32:32.931234Z 3045181 [ERROR] /usr/sbin/mysqld: Out of memory (Needed 2576982012 bytes)"  
 insertId: "s=6d6327081d4e4a1bab5830443a5d7d2f;i=3275fa;b=b2909fad69874f529830c69e12050af7;m=f0b6ccf14d;t=548f2f167843a;x=e9e749ac80b48145@a3"  
 resource: {
  type: "cloudsql_database"   {
   project_id: "project-12345"    
   database_id: "project-12345:master1"    
   region: "europe"    
  }
 }
 timestamp: "2017-02-20T09:32:32.932480Z"  
 severity: "ERROR"  
 logName: "projects/project-12345/logs/cloudsql.googleapis.com%2Fmysql.err"  
}

thanks,
Ann

On Wednesday, February 15, 2017 at 7:25:29 PM UTC+1, paynen wrote:
Hey Ann,

Is there a particular query which is being run when this occurs? My guess would be that the memory is being used up by a particular query and the demands it makes on internal temporary tables, etc. Also, could you provide a sample of the error messages, along with the size of the instance memory that was configured when each one occurred? Finally, in order to help debug this, you may want to start logging the exact query used whenever catching an error like this.

Cheers,

Nick
Cloud Platform Community Support

On Wednesday, February 15, 2017 at 12:12:15 PM UTC-5, Ann Su wrote:
Ever since we've migrated to Google Cloud SQL we are hitting an error every now and then:

/usr/sbin/mysqld: Out of memory (Needed 2576982012 bytes)

The number of bytes needed is always the same (~2.5G) and increasing RAM on an instance doesn't help.

Since there are no super privileges or direct access to configs and the scope of adjustable flags from UI/console is very limited we can't experiment with mysql configuration to find out what's causing the problem.

Do you have any ideas how we can debug this issue?

thanks,
Ann




--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/-JHM_F405jM/unsubscribe.
To unsubscribe from this group and all its topics, 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/bcac486d-c06e-4e60-8e59-7474237416c1%40googlegroups.com.

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

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/-JHM_F405jM/unsubscribe.
To unsubscribe from this group and all its topics, 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/7f2a5f33-1407-45e0-8776-8dbbbc82098b%40googlegroups.com.

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

--
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/62a471e1-7530-4162-bd0a-7a456ce8e623%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.