Skip to content

Error code 2. The service is currently unavailable. #2555

Closed

Description

@johnturnham

Using saveAll within a Parse Job to insert a batch of new objects into a remote mLab DB fails randomly with error object {"code":2,"message":"the service is currently unavailable"}. This error arose when when saving 6,000 new objects from this Job.

In an attempt to diagnose the issue, I separated the 6,000 objects into batches of objects and used saveAll on each batch. I've tested with batches as small as 10 objects and as many as 250 objects. Although the result is the same, this provided more information...

Most of these batches would be processed successfully, while one or more batches would occasionally fail with this message. Sometimes none fail. As a whole, the save process only succeeds without failure only about 50% of the time. The batches which fail seem completely random, even when using identical input (in this case, a CSV file) for each attempt.

The folks at mLab have investigated on their end for network connectivity issues, failed connection pooling, and other server resource limits. They've been very responsive and helpful. So far, there is no indication of issue on their end. We've tried reproducing this issue against a different, dedicated database cluster with more horsepower and yet the problem remains.

The error object described above appears to be an Internal Error Code originating from within Parse, although no specific details are available to troubleshoot this error code.

Steps to reproduce

The code below retrieves a CSV file, parses it, then creates objects for inserting. However, another Parse user has reproduced this issue 8 months ago and requested assistance with it via StackOverflow. Their code is much simpler, yet it still produces the error (accessible here: http://stackoverflow.com/questions/33932963/parse-com-background-job-fail-the-service-is-currently-unavailable )

My code is as follows...

  1. Option Why?? #1: Save all records in one saveAll.
  2. Option Add JS Syntax Highlighting to README.md code block #2: Save objects in small batches.

Expected Results

Objects should be saved to the DB without issue.

Actual Outcome

Process occasionally fails with error object {"code":2,"message":"the service is currently unavailable"}

Environment Setup

  • Server
    • parse-server version: Hosted on Parse.com (running in production mode w/ 600req/sec.)
    • Operating System: Hosted on Parse.com (DB migrated to mLab)
    • Hardware: Hosted on Parse.com (DB migrated to mLab)
    • Localhost or remote server?: Hosted on Parse.com (DB migrated to mLab)
  • Database
    • MongoDB version: 3.2.8
    • Storage engine: Unknown.
    • Hardware: Reproduced on Shared Cluster and Dedicated Cluster.
    • Localhost or remote server? mLab

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

Is this available on the Parse hosted environment? If so, where?

Activity

  1. flovilmart commented on Aug 19, 2016

    @flovilmart
    Contributor

    Your issue is on parse.com please refer to the support available at http://parse.com/help

  2. johnturnham commented on Aug 19, 2016

    @johnturnham
    Author

    Where? I've looked everywhere for this issue and a resolution.

    Please provide a link.

  3. flovilmart commented on Aug 19, 2016

    @flovilmart
    Contributor

    There is a contact us button right in the middle of the page.

  4. johnturnham commented on Aug 19, 2016

    @johnturnham
    Author

    That button points me here, to GitHub.

  5. flovilmart commented on Aug 19, 2016

    @flovilmart
    Contributor

    capture d ecran 2016-08-19 a 18 14 03

    Select your app and then continue to Facebook bug reporting tool

  6. johnturnham commented on Aug 22, 2016

    @johnturnham
    Author

    Hi flovimart,

    I've submitted this request to the "Facebook for developers" area that you've suggested but 1) haven't received any confirmation response since submitting it days ago and 2) can't find my report anywhere in that site.

    It seems that I need to now register my app for use with Facebook to have any visibility into the status of the bug I submitted. However, I have no interest in registering my app for Facebook integration.

    Can you please advise as to how I can get a status on this ticket, so the Parse issues can be resolved?

    Thanks.

  7. flovilmart commented on Aug 22, 2016

    @flovilmart
    Contributor

    I'm not working with Facebook nor Parse, just contributing to the open source part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions