Hi Eliot,
we are also facing similar Error ...
ERROR:
URL /root/recoly/crons/send_mailer.php 1 Uncaught exception
'MongoCursorException' with message 'setShardVersion failed host:
x.x.x.x:10011 { oldVersion: Timestamp 0|0, ns: "recommendly.pages",
version: Timestamp 3000|0, globalVersion: Timestamp 2000|0, errmsg:
"client version differs from config's for collection
'recommendly.pages'", ok: 0.0 }' in /root/recoly/crons/send_mailer.php:
21 Stack trace: #0 /root/recoly/crons/send_mailer.php(21): MongoCursor-
>rewind() #1 {main} thrown in /root/recoly/crons/send_mailer.php:21
as per error which is at line no 21 in our code, we tried to find the
issue..
here some partial code with line no
LNo: 17 $pages = $pages_model->find(array('status' => 4, 'is_active'
=> 1, 'mail_time' => array('$gte'=> $min, '$lt'=> $max), 'subscribed'
=> 1));
LNo: 18 //$pages = $pages_model->find(array('status' => 4, 'id' =>
'249343554283')); // for testing
LNo: 19 $pages_count = $pages->count();
LNo: 20 if($pages_count > 0) {
LNo: 21 foreach ($pages as $page) {
LNo: 22 var_dump($page);
LNo: 23 $stats = Load::Library('mailerStats', array('page_id'
=> $page['id'], 'user_id' => $page['user_id']));
LNo: 24 $stats->dataExists($page);
LNo: 25 $stats->sendEmail($page);
LNo: 26 }
LNo: 27 }
shard key for $pages_model collection is "id" and at LNo: 17 we are
not using shard_key in find query.
so, you would you say, will this error because we are not using
shard_key in find wuery
Thanks
Raj
----------