我把这三个参数:
grpc.keepalive_time_ms=7200000
grpc.keepalive_timeout_ms=200000
grpc.keepalive_permit_without_calls=1
字符串
在/etc/php/8.1/apache2/conf.d/20-grpc.ini
,/etc/php/8.1/apache2/conf.d/custom-php.ini
,/etc/php/8.1/cli/conf.d/20-grpc.ini
和/etc/php/8.1/cli/conf.d/custom-php.ini
中。然后我重新启动webserver(整个Docker容器),并列出grpc config与php -i | grep grpc
,它们在输出中丢失:
/etc/php/8.1/cli/conf.d/20-grpc.ini,
grpc
grpc support => enabled
grpc module version => 1.59.1
grpc.enable_fork_support => 0 => 0
grpc.grpc_trace => all,-timer_check => all,-timer_check
grpc.grpc_verbosity => debug => debug
grpc.log_filename => /var/log/grpc.log => /var/log/grpc.log
grpc.poll_strategy => no value => no value
型
我用PHP 8.1,gRPC扩展1.45.0和1.59.1测试了它。我做错了什么?
1条答案
按热度按时间3hvapo4f1#
这些参数不属于PHP.ini配置文件,它们需要在PHP代码中,作为选项数组传递到gRPC客户端类构造函数中。
字符串