-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Spanner] Where is NumChannels config? #1052
Comments
Hi @castaneai, When you create a Session Pool instance, you can override the values specified in use Google\Cloud\Spanner\Session\CacheSessionPool;
$cache = \MyPsr6CacheImplementation;
$pool = new CacheSessionPool($cache, [
'maxSessions' => 250
]); By default, Google Cloud PHP will create enough sessions to reach the minimum session count, configured in the constructor ( If your configuration requires a minimum number of sessions higher than one, it is recommended that you call |
@jdpedrie Thank you for your reply! In my recognition, "Cloud Spanner Session" and "gRPC Channel" are in different layers. Cloud Spanner documentation says the following
In case of 500 which is the default value of |
@castaneai thanks for the additional information, and my apologies for misunderstanding the question. I'm working on getting a bit more information about this and will reply again as soon as I have an answer! |
Hi @castaneai, Thanks for your patience while I looked into this issue. At this time, it is only possible to maintain a single channel at a time within gRPC. We've opened an issue with the gRPC team to explore options to increase this limit. I'm going to keep this issue open for further discussion and to track the feature on our side. Please let me know if you've got any questions! |
Hi @castaneai , |
@ZhouyihaiDing Thank you for improving gRPC. |
Thanks to some great work by @ZhouyihaiDing and @WeiranFang (via #1243) our Spanner client now has support for a pool of channels with a default max size of 10. Going to close this out now, if there's anything else we can help address here please feel free to re-open! |
In Go client library, There is
NumChannels
in ClientConfig.And the max number of sessions is determined by
NumChannels
.https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/spanner/client.go#L157
But PHP client library has this fixed to 500 by default.
Where is
NumChannels
on PHP?How many channels does library open by default ?
The text was updated successfully, but these errors were encountered: