jmac11 / googlecloudsql

Automatically exported from code.google.com/p/googlecloudsql
0 stars 0 forks source link

SQL Admin API Export taking longer than it used to, causing timeout problems. #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I'm using the Java SQL Admin API v1beta4 rev5. We have had code running on 
older versions of this API since summer 2014 without issue. The problem is, 
small Export operations that used to complete in a few seconds now always take 
just over 1 minute (exceeding the App Engine timeout response time limit of 60 
sec by just a few seconds). We use small exports and imports to provide 
template databases for our customers. They are always small (schema for under 
12 tables and only sample data) and previously always exported and imported in 
just a few seconds. We would start the export and then poll the GCS bucket for 
the object every few seconds until the file was available. This worked reliably 
for 9+ months.

However, recently, the exported object started to appear in the GCS bucket 
(indicating that the export had indeed finished and the .sql file was 
available) but the operation status of the export is still "RUNNING", so any 
call to import from that file generated a "403 Operation failed because another 
operation was already in progress" error message.

I am hoping this is a bug and not an architecture change in the SQL Admin 
API... ideally the operation status should change to DONE when the operation is 
done, not at some arbitrary length of time after it has actually completed.

Is this a bug?

Code snippet:
ExportContext.SqlExportOptions exportOptions = new 
ExportContext.SqlExportOptions()
            .setTables( new ArrayList<String>(tableNames) );

        ExportContext exportContext = new ExportContext()
            .setDatabases(Arrays.asList(srcDatabase))
            .setFileType("SQL")
            .setUri(dumpUri)
            .setSqlExportOptions(exportOptions);

        InstancesExportRequest exportRequest = new InstancesExportRequest().setExportContext(exportContext);

        Operation op = this.sqlAdmin.instances().export(AuthUtils.GAE_PROJECT_NAME, nakedSrcInstance, exportRequest).execute(); 

What is the name of your database instance?

Issue is not database specific. Others have confirmed same behavior on stack 
overflow (see link below).

What is the expected output? What do you see instead?

Expect export of small database (10 tables and few rows of sample data) to 
complete in reasonably short period of time (5 - 10 seconds) as it has done for 
9+ months.

Please provide any additional information below.

More details of the problem can be found here:

http://stackoverflow.com/questions/29680420/sql-admin-api-export-taking-longer-t
han-it-used-to-causing-timeout-problems-is/29710497?iemail=1&noredirect=1#297104
97

Original issue reported on code.google.com by rhd...@gmail.com on 18 Apr 2015 at 4:43

GoogleCodeExporter commented 9 years ago
Please email your instance name to cloud-sql@google.com for us to debug it 
further, thanks.

Original comment by hta...@google.com on 27 Apr 2015 at 10:28

GoogleCodeExporter commented 9 years ago

Original comment by razv...@google.com on 28 Apr 2015 at 2:55

GoogleCodeExporter commented 9 years ago
We have identified the issue and are working on a fix. ETA is sometime next 
week.

Original comment by t...@google.com on 1 May 2015 at 12:05

GoogleCodeExporter commented 9 years ago
The fix is in effect now.

Original comment by t...@google.com on 6 May 2015 at 9:56