3

谁能解释这意味着什么以及我能做些什么?

Failed to read 4 bytes from socket within 300000 milliseconds

在使用 MongoDB 的新 PHP 驱动程序批量写入 MongoDB 期间,它会一次又一次地发生。完整的错误信息是:

Fatal error: Uncaught exception
'MongoDB\Driver\Exception\ConnectionTimeoutException' with message 'Failed to
send "insert" command with database "bibliographic": Failed to read 4 bytes
from socket within 300000 milliseconds.' in /var/www/html/bms/functions.php:143
Stack trace: #0 /var/www/html/bms/functions.php(143):
MongoDB\Driver\Manager->executeBulkWrite('bibliographic.d...',
Object(MongoDB\Driver\BulkWrite)) #1 /var/www/html/bms/webpages/import.php(13):
parseMARC21XMLfile('../../DNB-Titel...', 'mongodb', '', '', '',
'bibliographic.d...') #2 {main} thrown in /var/www/html/bms/functions.php on
line 143

我试图用usleep()似乎“解决”问题的 PHP 函数使脚本变慢。但是脚本会变慢..谢谢!

4

0 回答 0