Comments (5)
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.
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.
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.
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)
- How to connect Bridge API (RESO API)
- Fatal error: Uncaught RESO\Error\Api: RESO\OpenIDConnect::requestAccessToken()
- New to this HOT 10
- Accept-Encoding as Request Header HOT 6
- RESO Web Example Fails in Util.php HOT 2
- Best Practice Question... HOT 1
- Does not comply with psr-4 autoloading standard HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reso-webapi-client-php.