Cannot stop import

1,112 views
Skip to first unread message

peter...@syw.com

unread,
Mar 18, 2016, 1:30:18 PM3/18/16
to Google Cloud SQL discuss
I was importing a CSV in GCS into a table using the Import functionality, but it's taking a while. I cannot stop the import or connect to the instance from Cloud Shell. How can a I force stop the import?

David Newgas

unread,
Mar 18, 2016, 2:18:09 PM3/18/16
to Google Cloud SQL discuss
Hi,

If you can log into the instance, you can use 'SHOW PROCESSLIST;' to find the id of the import thread and then use 'KILL ID;' to terminate it. As we don't provide a remote abort you can't cancel it if you can't log in. It will time out after 24 hours though.

I'm not actually sure which 'cloud shell' you are using to connect to you instance, could you show a screenshot or URL? What error message do you get connecting? Can you connect with the MySQL command line?

David

On Fri, Mar 18, 2016 at 10:30 AM, <peter...@syw.com> wrote:
I was importing a CSV in GCS into a table using the Import functionality, but it's taking a while. I cannot stop the import or connect to the instance from Cloud Shell. How can a I force stop the import?

--
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-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/5ea81770-3f1a-40d4-a7ea-48055a4c4790%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

peter...@syw.com

unread,
Mar 18, 2016, 2:34:23 PM3/18/16
to Google Cloud SQL discuss
Cloud Shell is a Google-provided command-line access, which includes a MySQL client. I cannot log into the instance as the client says "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0"

I got a notification saying: "Import data into Cloud SQL instance / Unknown error. / Retry" from Google's notifications, but it doesn't seem the process has stopped, as the status is still "Running."

David Newgas

unread,
Mar 18, 2016, 3:05:42 PM3/18/16
to Google Cloud SQL discuss
Looking at the metrics on your instance it does appear that the load is till running - IOPS are elevated and storage used is increasing. Take a look at the "Read/Write InnoDB Pages" and "Storage Used" graphs on https://console.cloud.google.com/sql/instances/INSTANCE_ID/overview?project=YOUR_PROJECT .

I believe you are getting that error because your Cloud Shell instance is not authorized to access your Cloud SQL instance, and not for any reason relating to the import. Try using "gcloud beta sql connect INSTANCE_ID" to connect to the SQL instance from cloud shell. 

David

On Fri, Mar 18, 2016 at 11:34 AM, <peter...@syw.com> wrote:
Cloud Shell is a Google-provided command-line access, which includes a MySQL client. I cannot log into the instance as the client says "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0"

I got a notification saying: "Import data into Cloud SQL instance / Unknown error. / Retry" from Google's notifications, but it doesn't seem the process has stopped, as the status is still "Running."

--
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-d...@googlegroups.com.

peter...@syw.com

unread,
Mar 18, 2016, 3:12:37 PM3/18/16
to Google Cloud SQL discuss
Using "gcloud beta sql connect [INSTANCE-ID]" results in "ERROR: (gcloud.beta.sql.connect) Operation failed because another operation was already in progress."

The storage is indeed increasing, and "Read/Write InnoDB Pages" is sustained at around 89 pages/sec, lowering occasionally.

Is there a way to kill the current operation, as I don't want it to finish anymore?

David Newgas

unread,
Mar 18, 2016, 3:27:20 PM3/18/16
to Google Cloud SQL discuss
Uh, so the only way is still to log in and do the show processlist/kill combo. The sql connect command is failing because it needs to authorize a new IP, but it can't do this while the import  is running.

Your instance already has 3 IPs authorized (which you can see in the authorizednetworks section of 'gcloud sql instances describe INSTANCE'). If you can connect from one of those IP addresses then you can kill from them. You can also do so from within your GAE app, but doing so is a bit harder.

--
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-d...@googlegroups.com.

Emery Lapinski

unread,
Apr 1, 2016, 2:04:20 PM4/1/16
to Google Cloud SQL discuss
If you can log into the instance, you can use 'SHOW PROCESSLIST;' to find the id of the import thread and then use 'KILL ID;' to terminate it. As we don't provide a remote abort you can't cancel it if you can't log in. It will time out after 24 hours though.


I get:

"Error: You are not owner of thread 54
SQLState:  HY000
ErrorCode: 1095 "
Reply all
Reply to author
Forward
0 new messages