Skip to main content

Java

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.

JedisDataException ERR unknown command CONFIG

·93 words·1 min
Error # While trying to setup Azure Cache for Redis as spring session store, I encountered following exception: .JedisDataException: ERR unknown command CONFIG, with args beginning with: get, notify-keyspace-events": 1, Fix # Found the solution in spring-session-gh-issue Kotlin @Configuration class HttpSessionConfig() { companion object { // another solution could be to enable notify-keyspace-events for redis @Bean fun configureRedisAction(): ConfigureRedisAction { return ConfigureRedisAction.NO_OP } } } Java @Configuration class HttpSessionConfig() { // another solution could be to enable notify-keyspace-events for redis @Bean public static ConfigureRedisAction configureRedisAction() { return ConfigureRedisAction.NO_OP; } } Links # spring-session-gh-issue

Kubernetes introduction

·574 words·3 mins
Kubernetes Introduction # Build a docker image # Dockerfile default filename FROM base image to be used for container ADD copies files/directories/remote file urls to container filesystem. Tarball and Remote URL (git, http) handling COPY same as ADD without tar and remote url handling CMD kubectl –namespace <DEV|STAGING|PROD> get deployments,pods,svc,ingress