Giter Site home page Giter Site logo

Comments (5)

JacobEdmondKerr avatar JacobEdmondKerr commented on July 29, 2024

I am having issues with a memory leak via CURL. I'm not sure if it's my PHP version? I'm using PHP Version 5.5.38. SteveMullen did you find a solution to this problem?

The line that is using the memory is line 185 in CurlClient.php: $rbody = curl_exec($this->curl); I have read that CURL has issues with CURLOPT_RETURNTRANSFER in some versions of PHP.

from reso-webapi-client-php.

SteveMullen avatar SteveMullen commented on July 29, 2024

Hi Jacob - I don't use the RESO\RESO api anymore, because there were a few problems I couldn't solve. I ended up writing my own code.

from reso-webapi-client-php.

abiggrboat avatar abiggrboat commented on July 29, 2024

I just started using the reso api client and have noticed the same issue. It's not possible to retrieve larger numbers of records in a loop without exhausting all available memory. It turns out the culprit is the request member function is initializing the curl client on every call. I revised the request class (i.e. in my copy) to persist the curl object and only initialize it once and the memory leak is gone.

from reso-webapi-client-php.

redtailmatt avatar redtailmatt commented on July 29, 2024

I've noticed that the RESO\HttpClient\CurlClient is never closed in RESO\Request::request() or ::requestPost().
Have you tried adding $curl->close(); before the return line of the request functions? This significantly reduced the memory usage for me.

from reso-webapi-client-php.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.