An Azure managed MySQL database service for app development and deployment.
The PDO 2002 message confirms the App Service could not open a TCP connection to MySQL, but it does not prove the cause. Because the failure coincided with a CPU spike and cleared after restart, resource saturation, connection exhaustion, or a transient restart/failover are the leading possibilities.
In Azure Monitor, correlate 22:27 UTC with Host CPU, Memory, Storage IO, Active Connections, Total Connections, and Aborted Connections. Check Resource Health and the Activity Log for maintenance or failover. Enable MySQL error and slow-query logs, then inspect statements running immediately before the spike. Verify the application uses the server FQDN, connection pooling, finite timeouts, and retry logic with exponential backoff. Optimize slow queries and scale compute if CPU remains sustained. If this recurs without a matching metric or log event, open Microsoft Support with the UTC timestamp, server name, and relevant logs.