-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
After connecting to Couchbase server using PHP SDK v4, unexpected warning messages are generated when performing an operation.
Steps to reproduce the issue: https://github.com/deminy/couchbase-issues/tree/couchbase4/issue-7
Test code used:
<?php
/**
* This script generates unexpected warning messages when Couchbase logging level is set to "warning".
*
* After connecting to Couchbase server using PHP SDK v4, unexpected/confusing warning messages are generated when
* performing an operation.
*
* Usage:
* docker compose exec -ti client php -d couchbase.log_level=warning ./test.php
*/
declare(strict_types=1);
require_once $_SERVER['HOME'] . '/.composer/vendor/autoload.php';
use Couchbase\Cluster;
use Couchbase\ClusterOptions;
$options = new ClusterOptions();
$options->credentials('username', 'password');
$cluster = new Cluster('couchbase://server?network=default', $options);
$cluster->bucket('test')->defaultCollection()->removeMulti(['foo']);
echo 'Done.', PHP_EOL;Above test script generates following two unexpected warning messages when Couchbase logging level is set to "warning":
{
"level": "warning",
"message": "DNS SRV query returned 0 records for \"server\", assuming that cluster is listening this address",
"thread_id": 154,
"time": "2025-07-28 21:18:16.771942837.942837"
}{
"level": "warning",
"message": "[4a271e-43b0-ef42-b898-15eb592343bf50/test] unable to find connected session with GCCCP support, retry in 2500ms",
"thread_id": 154,
"time": "2025-07-28 21:18:16.783836753.836753"
}These warnings are unexpected and may confuse developers, even though they do not affect the script's functionality.
Possible adjustments to avoid the confusion:
- Change the logging level to "info" for these messages.
- Update the warning messages to explicitly indicate that they are non-critical and do not affect functionality.
Metadata
Metadata
Assignees
Labels
No labels