1

I am trying to make a N1QL query. I am successful in getting cluster connection. But it is failed when I am trying to execute the query. In the nginx error log I am getting this error-

[error] 17518#17518: *7703 FastCGI sent in stderr: "PHP message: [cb,WARN] (lcbio_mgr L:483 
I:3887268011) <localhost:8093> 
(HE=0x56542f856a50) Pooled socket is dead. Continuing to next one" while reading response 
header from upstream, client: xxxxxxxxxxxxxxxx........

I’ve thought of firewall issue and tried disabling firewall. Also tried enabling ports in firewall and none worked. I am using Couchbase Server Enterprise Edition 6.6.1 build 9213. Here is the code I am using for cluster connection-

$connectionString = "couchbase://localhost";
$options          = new \Couchbase\ClusterOptions();
$options->credentials('USERNAME', 'PASSWORD');
$cluster = new \Couchbase\Cluster($connectionString, $options);

new \Couchbase\QueryOptions();
$options->namedParameters($queryParams);
$cluster->query($query, $options);

What can I try to solve this?

halfer
  • 19,824
  • 17
  • 99
  • 186
rafi
  • 1,493
  • 3
  • 31
  • 43
  • Which ports have you opened? Also, if you suspect a networking issue, SDK Doctor can help to diagnose that: https://docs.couchbase.com/server/current/sdk/sdk-doctor.html – Matthew Groves Mar 29 '21 at 13:49
  • 1
    @MatthewGroves thanks for the reply. I found out another way to make it work, ignoring that error. I will definitely use sdk doctor to detect the problem later. Thanks! – rafi Mar 29 '21 at 17:34
  • Would you please share your workaround as an answer here for future developers? – Matthew Groves Mar 29 '21 at 17:47
  • @MatthewGroves I was actually upgrading my couchbase version from 4.5 to 6.6. There were one place where the PHP SDK wasn't upgraded and it didn't work. I implemented the 3.1 version of the SDK and made sure it is for everywhere else and the web app was alive again. But that error is actually still there. So actually there is no solution I've found still now. And this is years old problem for couchbase, as i saw in couch forum about this same error someone asked 1/2 years ago. And it wasn't solved – rafi Mar 30 '21 at 05:04
  • Couchbase Server 6.0.4 and later will unceremoniously drop a Query connection if it is idle for 5 seconds. Modern SDKs set the query idle timeout to a lower value, but some older SDKs default to a longer idle timeout that leads to the server dropping the connection. What is your current query idle timeout setting? Does lowering it to 4 seconds resolve the issue? – dnault Apr 02 '21 at 20:25

0 Answers0