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…