Description
Check out #1271 for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!
Many members of the community use Stack Overflow and Server Fault to ask questions. Read through the existing questions or ask your own!
- Stack Overflow: http://stackoverflow.com/questions/tagged/parse.com
- Server Fault: https://serverfault.com/tags/parse
For database migration help, please file a bug report at https://parse.com/help#report
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
- [ x] You've met the prerequisites: https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#prerequisites.
- [ x] You're running the latest version of Parse Server: https://github.com/ParsePlatform/parse-server/releases
- [ x] 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.
Environment Setup
- Server: parse-server version: 2.2.10, operating system: ubuntu 14.04, local
- Database: MongoDb 3.0.12
Steps to reproduce
- define Cloud function
Parse.Cloud.define('test', function(request, response) { (new Parse.Query('_User')).select('username').limit(2).find().then( function(r) { return (new Parse.Query('_User')).select('username').skip(2).limit(2).find(); } ).then( function(r) { response.success(r); }, function(error) { response.error(error); } ); });
- run it
- wait 120 seconds (it's default value for "server.socketOptions.connectTimeoutMS" and "server.socketOptions.socketTimeoutMS" of "databaseOptions" value of ParseServer config.
- run function again. result is:
curl: (52) Empty reply from server
I found that if the second query's limit is more than 1 in "test" cloud function, then auto-reconnection of database fails.
Logs/Trace
Here's log of mongod.log:
....
2016-05-20T17:12:05.280+0300 I NETWORK [conn369] end connection 127.0.0.1:54746 (0 connections now open)
2016-05-20T17:12:05.286+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:54747 #370 (1 connection now open)
2016-05-20T17:14:09.197+0300 I NETWORK [conn370] end connection 127.0.0.1:54747 (0 connections now open)
and it's not starting again :(