Skip to content

High response time from Installation Query #2537

Closed
@miracle7

Description

@miracle7

Issue Description

Our Parse-Server app is experiencing very poor response times, seemingly due to a large amount of Installations being queried with the following:
{"$or":[{"deviceToken":"<val>"},{"installationId":"<val>"}]}

image

I don't have that particular query in my code, so it seems that it is something parse is calling internally. @flovilmart is this related to the changes you made to Installation queries recently?

On our production server there are about 300,000 Installation objects, and probably a lot more to come when we get featured on the play store next week, so I am worried what this will do to the application.

Based on the metrics from Heroku, NewRelic and mLab (posted below) I don't think it is just a matter of requiring a beefier plan or more dynos, since no limits are really being hit.

If anyone could advise me as to what I can do to further diagnose this problem and improve response times / scalability of the app I would really appreciate it, since at the moment it is looking pretty hopeless.

Steps to reproduce

Run Parse-Server app with 300k Installations connecting with dot net SDK (Unity).

Expected Results

Response times below 500ms on average.

Actual Outcome

High response times (in the thousands).

Environment Setup

  • Server
    • parse-server version: 2.2.17
    • Heroku
    • 1x Standard Dyno
  • Database
    • MongoDB version: 2.1.18
    • mLab
    • Dedicated Cluster M1

Logs/Trace

I am not seeing any specific logs that are suspicious, apart from the occasional error:

error: Error generating response. ParseError {
Aug 16 18:56:03 torque-prod app/web.1: code: 135,
Aug 16 18:56:03 torque-prod app/web.1: message: 'at least one ID field (deviceToken, installationId) must be specified in this operation' } code=135, message=at least one ID field (deviceToken, installationId) must be specified in this operation

which seems like it may be related based on query mLab has flagged as being slow (deviceToken or installationId).

Here are some screenshots of various metric software, hopefully someone else can dig out more information from this than I have been able to:

Heroku
image

NewRelic

Overview:
image

Transactions:
image

Transaction Trace:
image

mLab

image

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