Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1508

MongoCommandCursor::timeout() not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 1.6.6
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
    • Environment:
      Ubuntu 12.04.2
    • # Replies:
      2
    • Last comment by Customer:
      true

      Description

      At this moment i can't specify cursor timeout for aggregation operation. maxTimeMS works on server side. But even with high values of maxTimeMS i still receive
      MongoCursorTimeoutException (127.0.0.1:27017: Read timed out after reading 0 bytes, waited for 30.000000 secondsss)

      MongoCommandCursor hasn't timeout method, so the only way to change timeout is using deprecated \MongoCursor::$timeout = -1;
      my query is:-

      $options = array("maxTimeMS" => 120000);
      $cursor = $this->aggregateCursor(array(
      	array('$match' => $condition),
      	array('$project' => $project),
      	array('$group' => array(
      		'_id' => $group,
      		'counts' => array( '$sum' => 1)
      	)),
      ), $options );
      

      mongo version detail :-
      mongo
      MongoDB Support => enabled
      Version => 1.6.6
      Streams Support => enabled
      SSL Support => enabled
      Supported Authentication Mechanisms
      MONGODB-CR => enabled
      SCRAM-SHA-1 => enabled
      MONGODB-X509 => enabled
      GSSAPI (Kerberos) => disabled
      PLAIN => disabled

      Directive => Local Value => Master Value
      mongo.default_host => localhost => localhost
      mongo.default_port => 27017 => 27017
      mongo.chunk_size => 261120 => 261120
      mongo.cmd => $ => $
      mongo.native_long => 1 => 1
      mongo.long_as_object => 0 => 0
      mongo.allow_empty_keys => 0 => 0
      mongo.ping_interval => 5 => 5
      mongo.is_master_interval => 15 => 15
      dev@ubuntu:~$

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              shahbaz shahbaz khan
              Participants:
              Last commenter:
              Rathi Gnanasekaran (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 45 weeks, 2 days ago
                Date of 1st Reply: