1

Cloud SQL에서 Cloud Datastore로 데이터를 이동하려고합니다.Google Cloud-SQL에서 Cloud Datastore로 데이터 이동

SQL 데이터베이스에 5 백만 미만의 항목이 있습니다.

할당량 오류가 발생하기 전에 하루에 100,000 개 이상의 항목 만 이동할 수있는 것처럼 보입니다.

초과하는 정확한 할당량을 파악할 수 없지만 지수를 너무 빨리 보내지 않도록 지수 백 오프가 있습니다.

결국 5 분이 지나면 SQL 서버에 대한 연결이 끊어 지지만 초당 할당량이 문제는 아닌 것 같습니다. 내 API 페이지 또는 App Engine API 페이지에서 초과하는 다른 할당량은 표시되지 않습니다.

두 개의 서로 다른 API를 사용하여 레코드를 작성했습니다.

GCP의 데이터 저장소 API 여기에 수입 googledatastore

코드입니다

:
https://gist.github.com/nburn42/d8b488da1d2dc53df63f4c4a32b95def

그리고 apache_beam.io.gcp.datastore.v1.datastoreio 수입 WriteToDatastore에서 데이터 흐름 API

다음은 코드입니다.
https://gist.github.com/nburn42/2c2a06e383aa6b04f84ed31548f1cb09

여기에 1 ~ 20 만건의 좋은 글을 읽은 후 나타나는 오류가 있습니다.
RPCError : Datastore에 'Write To Datastore/Write Mutation to Datastore'를 실행하는 동안 데이터 스토어를 호출하지 못했습니다. 오류 코드 : RESOURCE_EXHAUSTED. 메시지 : 할당량을 초과했습니다.

저는 이것을 컴퓨팅 엔진에서 실행하고 있습니다.

도움을 주시면 대단히 감사하겠습니다. 감사합니다.
Nathan

답변

4

Google에서 할당량을 늘리거나 Google에서 누군가 내 계정을 확인하여 문제를 확인했습니다.

여기에 답글입니다.

I understand that you want to know what specific quota you are reaching whenever you try to backup your Cloud SQL to Cloud Datastore.

Upon checking your project, it seems that the problem is that your App Engine application is at or near its spending limit. As of this time of writing, the Datastore Write Operations you have executed costed you 1.10$, which will be refreshed after 5 hours. It can definitely cause your resources to become unavailable until the daily spending limit is replenished. Kindly try to increase your spending limit as soon as possible to avoid service interruption and then run or execute your datastore write operations.

Give this a shot and let me know what happens. I will be looking forward to your reply.

이 문제가 해결되었습니다. 방금 앱 엔진에 들어가서 일일 지출 한도를 훨씬 높여야했습니다.

위에 포함 된 코드가 다른 사람들에게 도움이되기를 바랍니다.

관련 문제