Skip to content

Commit

Permalink
feat: Increase timeout for read and write
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jan 19, 2023
1 parent dc7c525 commit 68fa856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ Usage of fibr:
-publicURL string
Public URL {FIBR_PUBLIC_URL} (default "http://localhost:1080")
-readTimeout duration
[server] Read Timeout {FIBR_READ_TIMEOUT} (default 1m0s)
[server] Read Timeout {FIBR_READ_TIMEOUT} (default 2m0s)
-redisAddress string
[redis] Redis Address fqdn:port (blank to disable) {FIBR_REDIS_ADDRESS}
-redisAlias string
Expand All @@ -368,8 +368,6 @@ Usage of fibr:
[crud] Sanitize name on start {FIBR_SANITIZE_ON_START}
-shareAmqpExchange string
[share] AMQP Exchange Name {FIBR_SHARE_AMQP_EXCHANGE} (default "fibr.shares")
-shareAmqpExclusiveRoutingKey string
[share] AMQP Routing Key for exclusive lock on default exchange {FIBR_SHARE_AMQP_EXCLUSIVE_ROUTING_KEY} (default "fibr.semaphore.shares")
-shareAmqpRoutingKey string
[share] AMQP Routing Key for share {FIBR_SHARE_AMQP_ROUTING_KEY} (default "share")
-shutdownTimeout duration
Expand Down Expand Up @@ -431,7 +429,7 @@ Usage of fibr:
-webhookSecret string
[webhook] Secret for HMAC Signature {FIBR_WEBHOOK_SECRET}
-writeTimeout duration
[server] Write Timeout {FIBR_WRITE_TIMEOUT} (default 1m0s)
[server] Write Timeout {FIBR_WRITE_TIMEOUT} (default 2m0s)
```
# Caveats
Expand Down
2 changes: 1 addition & 1 deletion cmd/fibr/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func newConfig() (configuration, error) {
fs := flag.NewFlagSet("fibr", flag.ExitOnError)

return configuration{
appServer: server.Flags(fs, "", flags.NewOverride("ReadTimeout", time.Minute), flags.NewOverride("WriteTimeout", time.Minute)),
appServer: server.Flags(fs, "", flags.NewOverride("ReadTimeout", time.Minute*2), flags.NewOverride("WriteTimeout", time.Minute*2)),
promServer: server.Flags(fs, "prometheus", flags.NewOverride("Port", uint(9090)), flags.NewOverride("IdleTimeout", 10*time.Second), flags.NewOverride("ShutdownTimeout", 5*time.Second)),
health: health.Flags(fs, ""),

Expand Down

0 comments on commit 68fa856

Please sign in to comment.