Out of memory Error

I’m getting this error.
Out of memory (allocated 524288) (tried to allocate 1460675701 bytes) in CouchbaseNative on line 800

Any idea why?

This is my code

function CreateCouchBaseForBucket($configFile)
{    
    $server = json_decode(file_get_contents($configFile)); 
    $host = $server->couchbase->host; 
    $bucket = $server->couchbase->bucket;
    $password = $server->couchbase->password;

    //var_dump($server);
    //connecting to the cluster
    $cluster = new CouchbaseCluster($host);
    //opening the bucket
    $bucket = $cluster->openBucket($bucket, $password);
    return $bucket;
}
    
    $bucket = CreateCouchBaseForBucket("server.json");
    $result = $bucket->get("19249_pc");

The first time i make the http POST to this code, it will handle it properly.
but when I try to do it a second time, it will throw the out of Memory error.

I have tried setting my PHP memory limit to 1024M, 2048M and even unlimited.
Still happens.

I can only run the code again after I restarted my apache service…

Hey imasl,

The fix should be available through 2.0.2, which is expected to be released on Dec 2nd.

Cheers, Brett

thanks for the response :slight_smile: Waiting for the new version now

New version released! I have a few confirmations that it fixes the known issues you were encountering.
Read more here: http://docs.couchbase.com/developer/php-2.0/release-notes.html

Cheers, Brett