2012-10-24 5 views
5

우리 프로젝트에서 Map2edge을 크게 사용하려고합니다. 이제 우리는이 문제가 있는데, 'InternalError : internal error.'가 많이 있습니다. 로그에 오류 ... 그것의AppEngine MapReduce NDB, 반복 내부 오류 : 내부 오류

한 예 :

"POST /mapreduce/worker_callback HTTP/1.1" 500 0 "http://appname/mapreduce/worker_callback" "AppEngine-Google; 
(+http://code.google.com/appengine)" "appname.appspot.com" ms=18856 cpu_ms=15980 
queue_name=default task_name=appengine-mrshard-15828822618486744D69C-11-195 
instance=00c61b117c47e0cba49bc5e5c7f9d328693e95ce 
W 2012-10-24 06:51:27.140 
suspended generator _put_tasklet(context.py:274) raised InternalError(internal error.) 
W 2012-10-24 06:51:27.153 
suspended generator put(context.py:703) raised InternalError(internal error.) 
E 2012-10-24 06:51:27.207 
internal error. 
Traceback (most recent call last): 
    File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__ 
    rv = self.handle_exception(request, response, e) 
    File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__ 
    rv = self.router.dispatch(request, response) 
    File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher 
    return route.handler_adapter(request, response) 
    File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__ 
    return handler.dispatch() 
    File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch 
    return self.handle_exception(e, self.app.debug) 
    File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch 
    return method(*args, **kwargs) 
    File "/base/data/home/apps/s~appname/1.362664407983567993/mapreduce/base_handler.py", line 65, in post 
    self.handle() 
    File "/base/data/home/apps/s~appname/1.362664407983567993/mapreduce/handlers.py", line 208, in handle 
    ctx.flush() 
    File "/base/data/home/apps/s~appname/1.362664407983567993/mapreduce/context.py", line 333, in flush 
    pool.flush() 
    File "/base/data/home/apps/s~appname/1.362664407983567993/mapreduce/context.py", line 221, in flush 
    self.__flush_ndb_puts() 
    File "/base/data/home/apps/s~appname/1.362664407983567993/mapreduce/context.py", line 239, in __flush_ndb_puts 
    ndb.put_multi(self.ndb_puts.items, config=self.__create_config()) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/model.py", line 3650, in put_multi 
    for future in put_multi_async(entities, **ctx_options)] 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 325, in get_result 
    self.check_success() 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 368, in _help_tasklet_along 
    value = gen.throw(exc.__class__, exc, tb) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/context.py", line 703, in put 
    key = yield self._put_batcher.add(entity, options) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 368, in _help_tasklet_along 
    value = gen.throw(exc.__class__, exc, tb) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/context.py", line 274, in _put_tasklet 
    keys = yield self._conn.async_put(options, datastore_entities) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 454, in _on_rpc_completion 
    result = rpc.get_result() 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 834, in get_result 
    result = rpc.get_result() 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 604, in get_result 
    return self.__get_result_hook(self) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1569, in __put_hook 
    self.check_rpc_success(rpc) 
    File "/base/python27_runtime/python27_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1224, in check_rpc_success 
    raise _ToDatastoreError(err) 
InternalError: internal error. 

queue.yaml :

queue: 
- name: default 
    rate: 500/s 
    bucket_size: 100 
    max_concurrent_requests: 400 
    retry_parameters: 
    min_backoff_seconds: 5 
    max_backoff_seconds: 120 
    max_doublings: 2 

맵리 듀스 매퍼 PARAMS :

'shard_count': 16, 
'processing_rate': 200, 
'batch_size': 20 
we would like to increase these numbers, since we need more speed in processing, but once we try to increase it increases error rate... 
01 23,516,

Blob 저장소 파일 개수 : 몇 가지 (라인 그들 중 일부는 포함 수백만)

프론트 엔드 인스턴스 클래스 : F4

처리 흐름 :

  1. 우리는이에 대한 매퍼 사용하십시오 특정 처리.
  2. 사용자 BlobstoreLineInputReader (BLOB에는 텍스트 파일이 들어 있습니다).
  3. 각 행은 이미 존재하지 않는 경우 작성해야하는 새 항목을 나타냅니다 (일부는 갱신).

내 질문은 :

    우리는 이러한 오류를 피할 수있는 방법
  • ?
  • 매퍼 매개 변수 (shard_count, processing_rate, batch_size)를 선택/균형 조정하는 방법에 대한 힌트가 있습니까?
  • 작업과 관련하여 어떤 일이 발생합니까? 을 다시 시도합니까 (그렇다면 어떻게 제어 할 수 있습니까?).

아직, 우리는 here (control batch_size) 제공되는 제안 중 일부를 시도했지만 여전히이를 볼 수 있습니다.

+0

이 문제를 해결 했습니까? 오늘 내 작업 대기열에 의해 이러한 문제가 많이 발생합니다. – payala

답변

0

이것은 시간 초과 오류와 같이 보입니다. 로그가 생성되기 전에 프로세스가 실행되는 시간을 확인하려면 로그를 확인하십시오.

만약 그렇다면 put_multi()를 호출하는 항목의 수를 줄이거 나 (일괄 처리 크기 줄임) 타이머 확인을 추가하여 put_multi() 호출 당 평균 시간이 가까워지면 당신이 종료 한 프로세스 시간 제한에 다른 하나가 시작하게하십시오.