Skip to content

Cursor not found in GridFS/StreamWrapper.php #387

@fastmanu

Description

@fastmanu

Is there a way to pass nocursorTimout option (like on the cursor object) while getting a download stream from a gridfs bucket ? Asking this because i faced following error today, that makes me think about a cursor timeout :
Warning: MongoDB\Driver\Exception\RuntimeException: Cursor not found, cursor id: 245969474954 in /code/vendor/mongodb/mongodb/src/GridFS/StreamWrapper.php on line 134

Here's the code that triggered the exception :

$grid = $con->dbbame->selectGridFSBucket();
$id_file = new MongoDB\BSON\ObjectID($id_file);
return $grid->openDownloadStream($id_file);

returned ressource is then used in fgetcsv...

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