roadrunner-server / roadrunner-plugins

📦 Home for the roadrunner plugins
MIT License
25 stars 9 forks source link

[BUG] RR2 GRPC reset #69

Closed cappuc closed 3 years ago

cappuc commented 3 years ago

I was testing the updated grpc plugin for rr v2 I found a problem with the reset.

The version of RR used: v2.5.0-beta.1

After calling reset command, subsequent requests returned this error in the logs:

{
    "level": "info",
    "ts": 1633953748.839115,
    "logger": "grpc",
    "caller": "grpc/plugin.go:189",
    "msg": "method call finished with error",
    "error": "rpc error: code = Internal desc = static_pool_exec: Workers watcher stopped:\n\tstatic_pool_exec:\n\tworker_watcher_get_free_worker",
    "method": "/grpc.health.v1.Health/Check",
    "started": 1633953748.838041,
    "elapsed": 0.000668264
}

The config i used:

rpc:
  listen: tcp://127.0.0.1:6001

server:
  command: "php worker.php"

logs:
  mode: production
  level: debug
  output: stdout
  encoding: json

grpc:
  listen: tcp://127.0.0.1:9090
  proto: ./health.proto
rustatian commented 3 years ago

Hey @cappuc . Thanks for letting us know. I guess it's because we also need to restart the grpc server. I'll check and fix that in the next beta.

rustatian commented 3 years ago

@cappuc Found the issue. Forgot to update the pool pointer after Reset. Nice catch. Today will be the new beta.

rustatian commented 3 years ago

@cappuc Please, test the v2.5.0-beta.2: https://github.com/spiral/roadrunner-binary/releases/tag/v2.5.0-beta.2

cappuc commented 3 years ago

Thank you for the rapid fix! I'll test the new beta tomorrow

cappuc commented 3 years ago

@rustatian It works fine now. Thank you!

rustatian commented 3 years ago

@cappuc Great, thanks for the feedback 👍🏻