aboutsummaryrefslogtreecommitdiff
path: root/internal/config/serverconfig
AgeCommit message (Collapse)Author
2026-03-27all: run go fix -stringsseqHana Kim
Change-Id: Id22b6fbc926c516043a2a9869ce9042dedebc725 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/753433 Reviewed-by: Jonathan Amsterdam <jba@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-02-23internal/database: set db connection pool limitsHana Kim
Under high-load, the frontend can issue many queries and trigger many connections. This can exceed the Cloud SQL connection limit of 100 per instance enforced by the Cloud Run environment, even if the database itself has remaining global capacity. To prevent this, we introduce limits on the database connection pool. We also include settings for idle connections and connection lifetimes to ensure better resource management and connection rotation. Introduces new env vars: GO_DISCOVERY_DATABASE_MAX_OPEN_CONNS GO_DISCOVERY_DATABASE_MAX_IDLE_CONNS GO_DISCOVERY_DATABASE_CONN_MAX_LIFETIME GO_DISCOVERY_DATABASE_CONN_MAX_IDLE_TIME Updates SetPoolSettings to validate that MaxIdleConns does not exceed MaxOpenConns, providing a warning if it does and capping it. Change-Id: I74edac05c4a23102d64e74a180c661c223e1b757 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/747620 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org> Reviewed-by: Nicholas Husin <husin@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com>
2025-11-05internal/config/serverconfig: randomly pick two DBs from same envHongxiang Jiang
Primary and secondary DB will be derived from a single env var GO_DISCOVERY_DATABASE_HOST. The env GO_DISCOVERY_DATABASE_SECONDARY_HOST will be obsolete. Change-Id: I4c5276c1fef7c93f9abbe5878401f22bdbab69dd Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/717800 Reviewed-by: Nicholas Husin <nsh@golang.org> kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-10-28all: remove code for the decommissioned beta environmentNicholas S. Husin
The beta environment is no longer in use. This change removes related logic and references, such as the middleware redirect to beta.pkg.go.dev. Change-Id: I0c6ebbe11d5689ccf2abf8c722399d8dc339db89 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/715321 kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
2025-09-08cmd/internal/cmdconfig: include Cloud Run instance ID in logsMichael Pratt
This aids in diagnosing per-instance issues. The instance ID seems like it would belong in the MonitoredResource labels (configured in serverconfig), but the top-level instanceId field is the standard name for this field on Cloud Run. Log messages going directly to stderr (before we configure logging) get this label automatically from the Cloud Run infra. When we use stackdriver directly we apparently need to add this ourselves. See https://cloud.google.com/run/docs/logging#service-fields. Change-Id: I6a6a636cb11a2abc00347e0679605ebbdb9995f4 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/700396 Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> kokoro-CI: kokoro <noreply+kokoro@google.com>
2023-08-25internal/config: separate config initialization into serverconfigMichael Matloob
This change creates a new package that does config initialization and other GCP-specific operations that were previously done in package config, so that config can have no cloud dependencies. For golang/go#61399 Change-Id: I8d78294834e325b47d838892a1cef87003a4b90a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/522516 Run-TryBot: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com>