diff options
author | Valery Piashchynski <[email protected]> | 2022-11-25 11:25:15 +0100 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2022-11-25 11:25:15 +0100 |
commit | 823078cfc024c004497f74950507c20ba36ce4aa (patch) | |
tree | c0489be28a34e0fe3df635672f837886ea3c0af0 | |
parent | 33bebe596b6c920634ec9386d818b912939de94b (diff) |
chore: update .rr.yaml, use proper procs number when running in docker
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | .rr.yaml | 122 | ||||
-rw-r--r-- | cmd/rr/main.go | 1 | ||||
-rw-r--r-- | go.mod | 1 | ||||
-rw-r--r-- | go.sum | 4 |
4 files changed, 117 insertions, 11 deletions
@@ -279,6 +279,8 @@ temporal: server_name: "tls-sample" # Activities pool settings. + # + # Equal to the regular pool options activities: # Debug mode for the pool. In this mode, pool will not pre-allocate the worker. Worker (only 1, num_workers ignored) will be allocated right after the request arrived. # @@ -300,12 +302,17 @@ temporal: # Default: 0 max_jobs: 0 - # Timeout for worker allocation. Zero means no limit. + # Timeout for worker allocation. Zero means 60s. # # Default: 60s allocate_timeout: 60s - # Timeout for worker destroying before process killing. Zero means no limit. + # Timeout for the reset timeout. Zero means 60s. + # + # Default: 60s + reset_timeout: 60s + + # Timeout for worker destroying before process killing. Zero means 60s. # # Default: 60s destroy_timeout: 60s @@ -341,6 +348,7 @@ temporal: # KV plugin settings. Available drivers: boltdb, redis, memcached, memory. +# # Any number of sections can be defined here. kv: # User defined name of the section @@ -351,6 +359,7 @@ kv: # # This option is required. driver: boltdb + # Local configuration section # # This option is required to use local section, otherwise (boltdb-south) global configuration will be used. @@ -841,12 +850,17 @@ http: # Default: 0 max_jobs: 0 - # Timeout for worker allocation. Zero means no limit. + # Timeout for worker allocation. Zero means 60s. # # Default: 60s allocate_timeout: 60s - # Timeout for worker destroying before process killing. Zero means no limit. + # Timeout for the reset timeout. Zero means 60s. + # + # Default: 60s + reset_timeout: 60s + + # Timeout for worker destroying before process killing. Zero means 60s. # # Default: 60s destroy_timeout: 60s @@ -1167,10 +1181,39 @@ jobs: # worker pool configuration pool: - command: "" - num_workers: 10 + # Debug mode for the pool. In this mode, pool will not pre-allocate the worker. Worker (only 1, num_workers ignored) will be allocated right after the request arrived. + # + # Default: false + debug: false + + # Override server's command + # + # Default: empty + command: "php my-super-app.php" + + # How many worker processes will be started. Zero (or nothing) means the number of logical CPUs. + # + # Default: 0 + num_workers: 0 + + # Maximal count of worker executions. Zero (or nothing) means no limit. + # + # Default: 0 max_jobs: 0 + + # Timeout for worker allocation. Zero means 60s. + # + # Default: 60s allocate_timeout: 60s + + # Timeout for the reset timeout. Zero means 60s. + # + # Default: 60s + reset_timeout: 60s + + # Timeout for worker destroying before process killing. Zero means 60s. + # + # Default: 60s destroy_timeout: 60s # List of broker pipelines associated with the drivers. @@ -1733,10 +1776,40 @@ grpc: # Usual workers pool configuration pool: - num_workers: 2 + # Debug mode for the pool. In this mode, pool will not pre-allocate the worker. Worker (only 1, num_workers ignored) will be allocated right after the request arrived. + # + # Default: false + debug: false + + # Override server's command + # + # Default: empty + command: "php my-super-app.php" + + # How many worker processes will be started. Zero (or nothing) means the number of logical CPUs. + # + # Default: 0 + num_workers: 0 + + # Maximal count of worker executions. Zero (or nothing) means no limit. + # + # Default: 0 max_jobs: 0 + + # Timeout for worker allocation. Zero means 60s. + # + # Default: 60s allocate_timeout: 60s - destroy_timeout: 60 + + # Timeout for the reset timeout. Zero means 60s. + # + # Default: 60s + reset_timeout: 60s + + # Timeout for worker destroying before process killing. Zero means 60s. + # + # Default: 60s + destroy_timeout: 60s # [SINCE 2.6] TCP plugin tcp: @@ -1771,10 +1844,39 @@ tcp: read_buf_size: 1 pool: - command: "" - num_workers: 5 + # Debug mode for the pool. In this mode, pool will not pre-allocate the worker. Worker (only 1, num_workers ignored) will be allocated right after the request arrived. + # + # Default: false + debug: false + + # Override server's command + # + # Default: empty + command: "php my-super-app.php" + + # How many worker processes will be started. Zero (or nothing) means the number of logical CPUs. + # + # Default: 0 + num_workers: 0 + + # Maximal count of worker executions. Zero (or nothing) means no limit. + # + # Default: 0 max_jobs: 0 + + # Timeout for worker allocation. Zero means 60s. + # + # Default: 60s allocate_timeout: 60s + + # Timeout for the reset timeout. Zero means 60s. + # + # Default: 60s + reset_timeout: 60s + + # Timeout for worker destroying before process killing. Zero means 60s. + # + # Default: 60s destroy_timeout: 60s # [SINCE 2.6] Fileserver to serve static files. diff --git a/cmd/rr/main.go b/cmd/rr/main.go index 054b192e..863947cd 100644 --- a/cmd/rr/main.go +++ b/cmd/rr/main.go @@ -6,6 +6,7 @@ import ( "github.com/fatih/color" "github.com/roadrunner-server/roadrunner/v2/internal/cli" + _ "go.uber.org/automaxprocs" ) // exitFn is a function for application exiting. @@ -52,6 +52,7 @@ require ( github.com/stretchr/testify v1.8.1 github.com/temporalio/roadrunner-temporal/v2 v2.0.0 go.buf.build/protocolbuffers/go/roadrunner-server/api v1.3.27 + go.uber.org/automaxprocs v1.5.1 ) exclude ( @@ -587,7 +587,6 @@ github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/z github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.14.0 h1:t7uX3JBHdVwAi3G7sSSdbsk8NfgA+LnUS88V/2EKaA0= @@ -774,6 +773,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -1062,6 +1062,8 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= |