Check ID: cloudsql_instance_sqlserver_user_connections_flag
Provider: GCP
Service: cloudsql
Severity: MEDIUM
Categories: resilience
Resource type: sqladmin.googleapis.com/Instance

What this check verifies

Cloud SQL for SQL Server instances are evaluated to ensure the user connections database flag is set to 0 (unlimited), avoiding any artificial cap on concurrent user sessions

Risk

A capped user connections value can exhaust available sessions, causing login failures, aborted transactions, and timeouts. This reduces availability, can delay administrative access, and may lead to integrity issues from failed or inconsistent retries under load.

Recommendation

Set user connections to 0 to prevent artificial limits. Preserve availability with connection pooling, controlled retries, and capacity planning based on peak usage. If a cap is required, size it with ample headroom, monitor connection counts, and review regularly.

Remediation

gcloud sql instances patch <example_resource_name> --database-flags='"user connections"=0'

References

Where this check fires

This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable by Check ID = cloudsql_instance_sqlserver_user_connections_flag. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GCP checks