[PHP] gRPC channel connection with php-fpm

53 views
Skip to first unread message

jis...@wepay.com

unread,
Jan 15, 2019, 2:35:02 PM1/15/19
to grpc.io
Hello,

We want to start using PHP gRPC clients but have a question regarding php-fpm and the grpc channel connections.

When we send a request with PHP, php-fpm maintains a pool of workers to deal with the request. When using gRPC channels, does the php process bring up and down the gRPC channel with the worker lifecycle?

When create a channel, I see that you can create it with the following option: grpc_target_persist_bound. Will php-fpm create and destroy a channel on every request, or will the php channel be shared when sending the same target is specified?

Has anyone seen this issue, or had similar encounters when using PHP gRPC with php-fpm? Thanks for any help.

Stanley Cheung

unread,
Jan 15, 2019, 8:33:33 PM1/15/19
to jis...@wepay.com, grpc.io
On Tue, Jan 15, 2019 at 11:35 AM jisooh via grpc.io <grp...@googlegroups.com> wrote:
Hello,

We want to start using PHP gRPC clients but have a question regarding php-fpm and the grpc channel connections.

When we send a request with PHP, php-fpm maintains a pool of workers to deal with the request. When using gRPC channels, does the php process bring up and down the gRPC channel with the worker lifecycle?

Within a lifetime of a php-fpm worker, the grpc channel is reused. 
 

When create a channel, I see that you can create it with the following option: grpc_target_persist_bound. Will php-fpm create and destroy a channel on every request, or will the php channel be shared when sending the same target is specified?

The underlying grpc channel will be re-used.
 

Has anyone seen this issue, or had similar encounters when using PHP gRPC with php-fpm? Thanks for any help.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/47aa16ba-9866-4b50-9ccb-2109c2d86815%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jis...@wepay.com

unread,
Jan 16, 2019, 4:47:02 PM1/16/19
to grpc.io
Thanks for the reply Stanley. This information is helpful to us.

Drake Gens

unread,
Jun 6, 2025, 2:19:33 PMJun 6
to grpc.io
Is there anyway to kill off persistent GRPC channels. We are seeing issues with so many connections being open.
Reply all
Reply to author
Forward
0 new messages