anycable / anycable-rails

AnyCable for Ruby on Rails applications
https://anycable.io
MIT License
500 stars 35 forks source link

workers_num #206

Closed dcalixto closed 1 month ago

dcalixto commented 1 month ago

Hello i tried to find in the docs and how reduce the workers on rpc and still has any clue how

ive tried rpc_workers: 10 and rpc: ANYCABLE_RPC_WORKERS=10 bundle exec anycable

and still starting with 30, so anyone know how set the workers_num?

Starting AnyCable RPC server (pid: 15809)
11:16:12 rpc.1  | AnyCable version: 1.5.1 (proto_version: v1)
11:16:12 rpc.1  | Serving Rails application from ./config/environment.rb
11:16:12 rpc.1  | gRPC version: 1.66.0
11:16:12 rpc.1  | WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
11:16:12 rpc.1  | I0000 00:00:1728310572.452437   15809 server.cc:1797] Completion queue of type 1 is being registered as a server-completion-queue
11:16:12 rpc.1  | Broadcasting Redis channel: __anycable__
11:16:12 rpc.1  | RPC server is starting...
11:16:12 rpc.1  | RPC server is listening on 127.0.0.1:50051 (workers_num: 30)
11:16:50 ws.1   | 2024/10/07 11:16:50 ERROR: [transport] Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII "too_many_pings".
11:18:10 ws.1   | 2024/10/07 11:18:10 ERROR: [transport] Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII "too_many_pings".
11:20:50 ws.1   | 2024/10/07 11:20:50 ERROR: [transport] Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII "too_many_pings"
palkan commented 1 month ago

You're looking for rpc_pool_size: https://docs.anycable.io/ruby/configuration?id=concurrency-settings