previously used the Mongo extension used by PHP5, but after upgrading to PHP7, instead of using MongoDB, use the composer package jenssegers/mongodb.
refer to upgrade PHP7 Operation MongoDB this article
PHP MongoDB BulkWriteException: waiting for replication timed out
[MongoDB\Driver\Exception\BulkWriteException]
waiting for replication timed out