Skip to content

Category

software development

Practical software engineering from a team lead: clean code, SOLID, refactoring, debugging, backend design and system architecture with Laravel and React.

Four steps to fix Redis connection refused: check whether Redis is listening with ss and redis-cli ping, check whether it is running in service or container logs, check bind address, port and protected mode, then fix the client host such as the Docker service name

10/24/2026

How to Fix Redis Connection Refused Errors

After a server move our fleet system logged Connection refused [tcp://127.0.0.1:6379]. Check what Redis listens on, read its startup errors, fix bind, port, password and Docker host names. Real Redis 8 output from redis-cli, Node, Python and Laravel.

By Muhammad Wilayat Shah

Read
Four-step diagram for fixing git pull divergent branches: count what diverged with git rev-list left-right count, commit or stash local work, reconcile with rebase, no-rebase or ff-only, then set a pull.rebase or pull.ff default

10/23/2026

How to Fix Git Pull Divergent Branches Error

git pull stopped with 'Need to specify how to reconcile divergent branches' on release day. Here is how I check what diverged and choose rebase, merge or fast-forward, with real Git 2.47 output.

By Muhammad Wilayat Shah

Read
How to Fix Docker Container Exited with Code 137

10/22/2026

How to Fix Docker Container Exited with Code 137

Fix docker exit code 137: find out whether the container was OOMKilled or force-stopped, set memory limits, tune Node.js, Laravel, Redis and PostgreSQL, and shut down gracefully.

By Muhammad Wilayat Shah

Read
Four steps to fix PostgreSQL peer authentication failed: read which pg_hba.conf line matched, match the Linux user with sudo -u postgres psql, use a password over TCP with -h 127.0.0.1 or a scram-sha-256 line, then reload with pg_reload_conf and test again

10/22/2026

How to Fix PostgreSQL Peer Authentication Failed

Peer authentication failed means PostgreSQL compared your Linux user with the role and never checked the password. Here are the fixes by cause, each reproduced on PostgreSQL 17: TCP logins, pg_hba.conf order, reloads and pg_ident maps.

By Muhammad Wilayat Shah

Read