Skip to content

Cannot connect to MongoDb when connectTimeoutMS period is completed #1849

Closed
@dtsymbal

Description

@dtsymbal

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!

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!

Environment Setup

  • Server: parse-server version: 2.2.10, operating system: ubuntu 14.04, local
  • Database: MongoDb 3.0.12

Steps to reproduce

  1. 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); } ); });
  2. run it
  3. wait 120 seconds (it's default value for "server.socketOptions.connectTimeoutMS" and "server.socketOptions.socketTimeoutMS" of "databaseOptions" value of ParseServer config.
  4. 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 :(

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