grafana/scripts/grafana-server/custom.ini
Matthew Jacobson 676877f882
Chore: Reduce flakiness of e2e tests caused by write contention in sqlite (#76659)
Reduce flakiness of e2e tests caused by write contention in sqlite

Write contention in sqlite on startup intermittently causes failed tests because
 of failed service runs. This can have various root causes, one example is
 dashboard provisioning:

Dashboard provisioning's frequent commits can cause other read transaction
 snapshots to invalidate and throw SQLITE_BUSY/SQLITE_BUSY_SNAPSHOT. If those
 failing transactions have a long length but not long enough to ensure all of
 the dashboards have finished provisioning it will run out of retries and fail
 entirely.

 This change helps indirectly reduce these write contentions by limiting the
 connection pool for e2e tests.

 As a bonus, having our e2e tests run using `max_open_conn = 2` means it acts
 as a guard against regressions that would affect certain internal instances
 that run with these settings.
2023-10-17 10:49:49 +03:00

13 lines
532 B
INI

[security]
content_security_policy = true
content_security_policy_template = """require-trusted-types-for 'script'; script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
[feature_toggles]
enable = publicDashboards
[database]
type=sqlite3
wal=true
max_idle_conn = 2
max_open_conn = 2