Skip to main content
Ravi Singh

Ravi Singh

Backend engineer — distributed systems, cloud infrastructure, and DevOps

Recent

Circular Favicon for Hugo Site

·364 words·2 mins
Problem # Adding a custom favicon to a Hugo site is straightforward — drop a favicon.ico into static/. But making it appear circular in the browser tab is trickier than it sounds. ImageMagick’s alpha channel handling for ICO files is unreliable. The corners either don’t go transparent or the 1-bit alpha makes edges look jagged. The browser ends up showing a square icon regardless.

Find Files And Delete Recursively

·89 words·1 min
Problem # Sometimes when using monorepos to host multiple services in a single repository, there may be a requirement to delete a file or list of files from each microservice. For example, I needed to delete application-dev.yml files for all the services after getting rid of dev environment in favor of acceptance. Solution # Use following find command to find application-dev.yml files recursively and delete them.

Nginx Ingress Controller forward headers

·100 words·1 min
Error # While moving to kubernetes, and migrating spring boot apps, we encountered a strange behavior that few of the webpages served by freemarker templates in spring boot were adding port :8080 instead of just using the hostname with SSL port :443 Fix # After some investigation and trying to find some workaround, we found out that X-Forwarded-* headers needs to be forwarded by nginx ingress controller when it’s behind an azure app gateway(L7 load balancer).

Spring Boot Request Header too large

·145 words·1 min
How to solve IllegalArgumentException: Request header is too large in spring boot # When migrating a spring boot application to cloud, multiple layers got added to serve traffic. On prem: nginx -> spring boot app (tomcat) Azure: nginx -> azure application gateway -> nginx ingress controller -> spring boot app(tomcat) In Azure, we noticed that some of http requests threw 400 http status code in our logs.

Git Config

·8 words·1 min
Git Config commands git config –global init.defaultBranch main

Fix Only_full_group_by_sql_error

Recently, I encountered sql state 42000 error in a spring boot application while moving from MySQL version 5.6 to 8.0. After inspecting stack trace and some googling, I got to know that few default configurations have changed in MySQL 8.0 (as expected 😃 ). This caused our poorly written queries to fail during migration. Background # Lets look at sample query using spring-data jpa to gather some analytics by aggregating data about a customer ordering products