Spring Session storage 를 Redis 로 설정하기 !
·
개발중/Spring Boot & Redis
Redis 로컬 설치curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.listsudo apt-get updatesudo apt-get install redissudo service redis-server start local 에서 실행redis 접속redis-cli redis 실시간 모니터링redis-cli MONITOR maven 추가 org.springframewo..
[트러블슈팅] Could not connect to Redis at 127.0.0.1:6379: Connection refused
·
개발중/Redis
redis local 에서 접속하려니 아래와 같은 오류가 발생했습니다. root@DESKTOP-Q26RDFJ:~# redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused redis-server 명령어로 redis 실행시켜준 후 root@DESKTOP-Q26RDFJ:~# redis-server 617:C 12 Sep 2023 13:37:43.911 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also caus..
[Redis 트러블슈팅] OOM command not allowed when used memory > 'maxmemory'.
·
개발중/Redis
초기에 Redis 와 Web 을 연동시에 잘 연동이 되는 것을 확인했으나. 어느 순간부터 아래와 같은 에러가 발생하는 것을 확인했습니다. 2023-09-11 23:41:34.216 ERROR 1 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost] : Exception Processing ErrorPage[errorCode=0, location=/error] org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: OOM command not allowed when use..
k8s Redis 구성방식에 대해서 고민하는 중입니다.
·
개발중/Redis
k8s Redis 메니페스트 아래와 같이 구성하면 초간단 Redis 는 구축됨 로컬 세션 스토리지를 레디스로 옮겼다. 근데 문제가 있다. 파드에 있는 노드가 죽어버리면 .. ? 로컬 스로리지에서 인증 정보를 저장할 때랑 별 다른게 없는것이 아닌가 ? 그래서 사람들이 master 와 slave 로 구성을 하는 것 같다. ConfigMap apiVersion: v1 kind: ConfigMap metadata: name: lucy3-redis-config namespace: lucy3 data: redis-config: "" Service apiVersion: v1 kind: Service metadata: name: lucy3-redis-service namespace: lucy3 spec: selecto..
Dockerfile Build 에러 (jdk 버전 문제)
·
개발중/Kubernetes (k8s)
이슈 Local 에서는 maven clean > maven install 잘 되나 Docker 로 빌드시 Failure 발생 16.91 [INFO] Changes detected - recompiling the module! 16.92 [INFO] Compiling 99 source files to /root/sources/target/classes 16.92 [INFO] ------------------------------------------------------------------------ 16.92 [INFO] BUILD FAILURE 16.92 [INFO] ------------------------------------------------------------------------ 16..
에러 - Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found
·
개발중/Spring Boot
Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found Inspection info: Reports resolution problems in a Maven model org.springframework.boot maven 버전을 확인하고 https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-maven-plugin 버전을 찾아서 추가한다. 2.7.13 인식하지 못하는 에러가 해결되었다
JPA Bulk Insert 로 성능 향상 시키기
·
개발중/Java Persistence API (JPA)
기존에 데이터 다중 삽입 할 때의 방식 public void insertMultipleV2vFailWord(List entities) { for (V2vFailWord entity : entities) { jm.em.persist(entity); } } 아래와 같이 insert 쿼리문이 반복적으로 발생하기 때문에 성능 저하가 발생할 수 밖에 없다. JPA 는 Bulk Insert 가 안될까 ? 여기 참조하니까 아래와 같이 답변이 나와있다. Transactional write-behind Hibernate tries to defer the Persistence Context flushing up until the last possible moment. This strategy has been traditi..
메일 보내는 API 는 REST API 중에 어느 메소드에 해당이 될까 ?
·
개발중/Rest Api
메일을 보내는 API를 구현할 때 대부분의 경우 HTTP의 POST 메서드를 사용합니다. 이유는 다음과 같습니다: 의미상으로 맞다. POST는 서버에 새로운 리소스를 생성하거나 데이터를 제출할 때 주로 사용되므로, 새로운 이메일을 서버에 제출하는 것은 POST 메서드의 의미와 잘 부합합니다. 데이터 전송 POST 메서드는 요청 본문에 데이터를 포함할 수 있으므로, 이메일의 본문, 수신자, 제목 등과 같은 다양한 정보를 쉽게 전송할 수 있습니다. 보안 비록 HTTP GET 요청도 데이터를 전송할 수 있지만, 민감한 정보나 큰 데이터를 URL의 쿼리 문자열에 포함하는 것은 좋지 않습니다. POST 요청은 이러한 데이터를 요청 본문에 안전하게 포함시킬 수 있습니다. 따라서, 메일을 보내는 API의 경우 POS..