Skip to content

Instantly share code, notes, and snippets.

View cholantesh's full-sized avatar

Natesh Mayuranathan cholantesh

View GitHub Profile
@schneefisch
schneefisch / restart_pods.md
Last active July 9, 2024 15:46
How to restart all pods in a statefulset or deployment

Various ways to restart pods

Restart deployment

The most gracefull way is to trigger a restart for the deployment. In this case, a pod will only be terminated once the new pod is ready. It will slowly replace all pods one after the other.

kubectl rollout restart deployment <deployment-name>

Restart pods in a statefulset

@richardbasile
richardbasile / uncommittedTxns.sql
Created May 24, 2019 12:40
Find uncommitted transactions in PostgreSQL
select *
from pg_stat_activity
where (state = 'idle in transaction')
and xact_start is not null ;
@ellispritchard
ellispritchard / config_eg.exs
Last active May 28, 2020 19:32
Logger backend with filters
config :logger, level: :debug,
backends: [
{Logger.Backends.FilterConsole, :debug_log},
{Logger.Backends.FilterConsole, :error_log}
]
# log my_app at debug level
config :logger, :debug_log,
level: :debug,
format: "[$level] $message\n",