Google ドライブ ( Python SDKを使用) に大きく依存するサービスがあります。サービスは Google ドライブのコレクションとファイルを使用します。
本番ログを確認したところ、Google Drive のdrive.files.get
API エンドポイントを呼び出すと、HTTP 500 Server Internal Error が多数発生していることがわかりました。エラー率は約0.5%です。調べてみると、極端なケースは1時間に9回連続でHTTP 500の失敗であることがわかりました。
例外は次のようになります。
File "/home/xxxxxx/xxxxxxx/storage.py", line 1185, in get_file
gdrive_file = self.client.files().get(fileId='0Bxn2GmQxR4zHYlNvaUlFNjl6MkE', fields='id,title,modifiedDate,createdDate,fileSize,mimeType,downloadUrl,labels').execute()
File "/usr/lib/python2.7/dist-packages/apiclient/http.py", line 389, in execute
raise HttpError(resp, content, self.uri)
HttpError: <HttpError 500 when requesting https://www.googleapis.com/drive/v2/files/0Bxn2GmQxR4zHYlNvaUlFNjl6MkE?fields=id%2Ctitle%2CmodifiedDate%2CcreatedDate%2CfileSize%2CmimeType%2CdownloadUrl%2Clabels&alt=json returned "Internal Error">
当社のサービスは、米国 WEST-2 データ センターの Amazon Web Service でホストされています。
誰かに同様の問題がありましたか?どんな助けでも大歓迎です。