36015

Getting “Application Error: 10” in App Engine Map-Reduce

I'm getting errors like this during the reduce step. The MapReduce Overview page reports that all jobs have completed successfully, but half the records that I was trying to write out were not written. What is causing this error, and how can I fix it?:

ApplicationError: 10 Traceback (most recent call last): File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__ rv = self.handle_exception(request, response, e) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__ rv = self.router.dispatch(request, response) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher return route.handler_adapter(request, response) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__ return handler.dispatch() File "/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 "/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~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/base_handler.py", line 65, in post self.handle() File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/handlers.py", line 181, in handle entity, input_reader, ctx, tstate) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/handlers.py", line 298, in process_data output_writer.write(output, ctx) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/output_writers.py", line 693, in write ctx.get_pool("records_pool").append(str(data)) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/output_writers.py", line 336, in append self.flush() File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/output_writers.py", line 371, in flush COUNTER_IO_WRITE_BYTES, len(str_buf))(self._ctx) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 297, in __exit__ self.close() File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 291, in close self._make_rpc_call_with_retry('Close', request, response) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 427, in _make_rpc_call_with_retry _make_call(method, request, response) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 252, in _make_call _raise_app_error(e) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 195, in _raise_app_error raise FileNotOpenedError(e) FileNotOpenedError: ApplicationError: 10 Traceback (most recent call last): File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/main.py", line 105, in main util.run_wsgi_app(APP) File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/webapp/util.py", line 98, in run_wsgi_app run_bare_wsgi_app(add_wsgi_middleware(application)) File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/webapp/util.py", line 116, in run_bare_wsgi_app result = application(env, _start_response) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in __call__ response = self._internal_error(e) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__ rv = self.handle_exception(request, response, e) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__ rv = self.router.dispatch(request, response) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher return route.handler_adapter(request, response) File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__ return handler.dispatch() File "/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 "/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~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/base_handler.py", line 65, in post self.handle() File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/handlers.py", line 181, in handle entity, input_reader, ctx, tstate) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/handlers.py", line 298, in process_data output_writer.write(output, ctx) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/output_writers.py", line 693, in write ctx.get_pool("records_pool").append(str(data)) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/output_writers.py", line 336, in append self.flush() File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/output_writers.py", line 371, in flush COUNTER_IO_WRITE_BYTES, len(str_buf))(self._ctx) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 297, in __exit__ self.close() File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 291, in close self._make_rpc_call_with_retry('Close', request, response) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 427, in _make_rpc_call_with_retry _make_call(method, request, response) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 252, in _make_call _raise_app_error(e) File "/base/data/home/apps/s~getaround3/dont-make-this-default-export-mr.366029363091232181/mapreduce/lib/files/file.py", line 195, in _raise_app_error raise FileNotOpenedError(e) FileNotOpenedError: ApplicationError: 10

Answer1:

I increased the number of shards which seems to have fixed the problem. Increasing the number of shards reduces the amount of time each slice has to hold a file open which may have been the cause of the problem I had.

Answer2:

Holding the file open for more than 30 seconds will also result in this error. Try to break the writes into multiple writes.

refer link for deatils https://groups.google.com/forum/#!topic/google-appengine-java/5XBVaVDKvvs

Recommend

  • angular.js ui-route how catch route or url or params after reject?
  • Xcode launch app error in Mac 10.9 Mavericks
  • why route of backbone needs the default route
  • How to unit test a Angular 4 component which uses router.paramMap
  • Django Class view didn't return an HttpResponse object. It returned None instead
  • Einsum optimize fails for basic operation
  • Using let variables in a lambda in Scheme
  • TCameraComponent and TVideoCaptureDevice do not initialize in Win32
  • Webpack-dev-server and isomorphic react-node application
  • is this code truly private? (python)
  • redirect user after update in class based view in django
  • Mocha throws unexpected token error for ES6 object spread operator
  • Android onKey w/ virtual keyboard
  • In matplotlib, how do you change the fontsize of a single figure?
  • Spring: No transaction manager has been configured
  • accepts_nested_attributes_for practical form use for in Rails 3
  • Object and struct member access and address offset calculation
  • Detect when Facebook like button is clicked
  • AJAX Html Editor Extender upload image appearing blank
  • How to Cache Real-time Data?
  • Can I check if a recipient has an automatic reply before I send an email?
  • Spring Data JPA custom method causing PropertyReferenceException
  • Getting last autonumber in access
  • req.body is undefined - nodejs
  • Possible to stop flickering java tooltip in heavyweight mode?
  • Trying to switch camera back to front but getting exception
  • Symfony2: How to get request parameter
  • Akka Routing: Reply's send to router ends up as dead letters
  • Is there a mandatory requirement to switch app.yaml?
  • Free memory of cv::Mat loaded using FileStorage API
  • Angular 2 constructor injection vs direct access
  • -fvisibility=hidden not passed by compiler for Debug builds
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Exception on Android 4.0 `android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode)`
  • embed rChart in Markdown
  • Checking variable from a different class in C#
  • Programmatically clearing map cache
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app