feat: ignore database timing out
This commit is contained in:
parent
b4e8dda9dd
commit
e5c74edd85
@ -62,6 +62,10 @@ namespace PluralKit.Bot
|
|||||||
// Ignore "Database is shutting down" error
|
// Ignore "Database is shutting down" error
|
||||||
if (e is PostgresException pe && pe.SqlState == "57P03") return false;
|
if (e is PostgresException pe && pe.SqlState == "57P03") return false;
|
||||||
|
|
||||||
|
// Ignore database timing out as well.
|
||||||
|
if (e is NpgsqlException tpe && tpe.InnerException is TimeoutException)
|
||||||
|
return false;
|
||||||
|
|
||||||
// Ignore thread pool exhaustion errors
|
// Ignore thread pool exhaustion errors
|
||||||
if (e is NpgsqlException npe && npe.Message.Contains("The connection pool has been exhausted")) return false;
|
if (e is NpgsqlException npe && npe.Message.Contains("The connection pool has been exhausted")) return false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user