PHP Portal » PHP Handbuch » The MongoCursorException class


The MongoCursorException class


Caused by accessing a cursor incorrectly or a error receiving a reply.

If there is an error receiving a reply, there will be a more specific error message to help diagnose the problem:

  • could not establish db connection

    A database reply could not be recieved because a connection with the database could not be established.

  • no db response

    This may not even be an error, for example, the database command "shutdown" returns no response. However, if you were expecting a response, this means the database didn't give one.

  • bad response length: %d, max: %d, did the db assert?

    This means that the database said that its response was greater than 4Mb or less than 0. Generally, a number greater than 5Mb should be reported to the developers as a potential database bug (max response length is 4Mb). A response of less than 0 often means a database assertion occured.

  • incomplete response

    Occurs if the database response started out correctly, but broke off in the middle.

  • error getting database response: errstr

    WSA error getting database response: errstr

    "errstr" is an io error reported directly from the C socket subsystem. On Windows, the error message is prefixed with "WSA".


extends MongoException {