Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnturnham opened this issue Aug 19, 2016 · 7 comments
Closed

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

johnturnham opened this issue Aug 19, 2016 · 7 comments

Comments

@johnturnham
Copy link

johnturnham commented Aug 19, 2016

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?

@flovilmart
Copy link
Contributor

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

@johnturnham
Copy link
Author

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

Please provide a link.

@flovilmart
Copy link
Contributor

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

@johnturnham
Copy link
Author

That button points me here, to GitHub.

@flovilmart
Copy link
Contributor

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

Select your app and then continue to Facebook bug reporting tool

@johnturnham
Copy link
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.

@flovilmart
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants