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

Memory leak in mongo-php-driver (bson_encode)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Won't Fix
    • Affects Version/s: 1.6.10
    • Fix Version/s: None
    • Component/s: pecl-mongo
    • Labels:
      None
    • Environment:
      CentOS 6.6 / PHP 5.4.32 / mongodb 3
    • # Replies:
      5
    • Last comment by Customer:
      true

      Description

      We have big problem with bson_encode. We using mongo-php-driver in async php-framework (PHPDaemon) and we have many requests to mongo per sec.
      After some time we getting "memory limit error" in the line with bson_encode. I made some trace tests and got bad results in functions with bson_encode. After work bson_encode php memory left used on always.

      HP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in PHPDaemon/Clients/Mongo/Pool.php on line 302 --> line there is in attached screenshot.

        Attachments

        1. bson_encode.png
          bson_encode.png
          30 kB
        2. trace.png
          trace.png
          190 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 34 weeks, 1 day ago
                Date of 1st Reply: