Description
- You've met the prerequisites: https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#prerequisites.
- You're running the latest version of Parse Server: https://github.com/ParsePlatform/parse-server/releases
- You've searched through existing issues: https://github.com/ParsePlatform/Parse-Server/issues?utf8=%E2%9C%93&q=is%3Aissue Chances are that your issue has been reported or resolved before.
- You have filled out every section below. Issues without sufficient information are more likely to be closed.
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>"}]}
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:
NewRelic
mLab