parse-community / parse-community/parse-server
MaxTimeMSExpired MongoDB error: "ok":0,"code":50,"codeName":"MaxTimeMSExpired"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
I want to update a relation query in the afterSave cloud code.
The relation is one (ProductDispatch) to many (ProductStock).
For one ProductionDispatch update, I want to update its related ProductStock.
There should be more than 40 ProductStock for one ProductDispatch
Actual Outcome
Got MongoDB error
Expected Outcome
All the 40 ProductStock should be update
Environment
Server
- Parse Server version:
4.4.0 - Operating system:
Windows 10 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Google Cloud
Database
- System (MongoDB or Postgres):
MongoDB - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
Javascript - SDK version:
3.4.1
Logs
"ProductsDispatch AfterSave error : {"message":{"operationTime":"7151695107090022402","ok":0,"code":50,"codeName":"MaxTimeMSExpired","$clusterTime":{"clusterTime":"7151695107090022402","signature":{"hash":"wedCGO+Gv8S+yOkVV4irmp4tewQ=","keyId":"7119179258311737345"}},"name":"MongoError"},"code":1}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report concerns an afterSave relation query updating ProductStock records and a MongoDB MaxTimeMSExpired error, but names no repository files or tests. Start by reproducing the update with more than 40 related records and trace the afterSave query path; done means identifying the cause and confirming that all related ProductStock records update successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100