0

非同期 URL Fetch を使用すると、次のような断続的なエラーが発生します。

300回のフェッチで、約20個の論文を取得しています。私は何か間違ったことをしていますか?それともこれはバグですか?

Traceback (most recent call last):
  File "/base/data/home/apps/s~culturemap-bulkmail/1.368407357562484358/bulkmail/views.py", line 83, in mailer
    emailer.send(email, context)
  File "/base/data/home/apps/s~culturemap-bulkmail/1.368407357562484358/bulkmail/mailers/amazon.py", line 91, in send
    self.connection.send(email, msg.message().as_string())
  File "/base/data/home/apps/s~culturemap-bulkmail/1.368407357562484358/bulkmail/mailers/amazon.py", line 49, in send
    headers=self.headers,
  File "/python27_runtime/python27_lib/versions/1/google/appengine/api/urlfetch.py", line 339, in make_fetch_call
    rpc.make_call('Fetch', request, response, _get_fetch_result, allow_truncated)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 519, in make_call
    assert self.__rpc.state == apiproxy_rpc.RPC.IDLE, repr(self.state)
AssertionError: 2

init : _

self.fetcher = urlfetch.create_rpc(deadline=60)

数回呼び出されるメソッド内: また、エラーが発生する行:

fetch = urlfetch.make_fetch_call(
  self.fetcher,
  'https://email.us-east-1.amazonaws.com/',
  payload=form_data,
  method=urlfetch.POST,
  headers=self.headers,
)

rpc を再利用するのではなく、新しい rpc を作成する必要があると思いますか?

4

1 に答える 1