I’m having troubles with a PHP script that imports csv files into MongoDB.
There’s one script named import_feeds.php, that calls (in a loop) another one named import_csv_file.php via exec:
exec("php import_csv_file.php --id=$id --file=$file --timestamp=$timestamp > logs/import_csv_file.log 2>&1", $output, $return);
The csv files usually have 10.000 lines of product information and there are around 4-5 mn lines total.
Currently I’m testing to import the same files over and over again, but the script randomly halts after around 4 mn lines have been processed.
There is no PHP error, nothing logged in mongod.log, nor in /var/log/messages, the script is still running, but it’s just doing nothing.
It looks like the process stops while it tries to connect to MongoDB.
We are running a root server with 24GB RAM, 8 cores, 2x 1,5TB HDD software Raid1, Centos 5.6, MongoDB 1.8.2, Mongo client 1.2.1, PHP 5.2.16 (utterramblings)
Thanks for your efforts. I updated to the latest mongodb php driver (1.2.2) and the problem disappeared.