'DynamoDB - SpringBoot app inside Docker Containers - Application starts delayed
so I have this docker-compose where I have my spring boot application in one container and my dynamodb in another. Everything goes well, the containers are created and started successfully, the application starts to log stuff and then I encounter a strange delay. The app is completely booted only after around 3 minutes, and after those 3 minutes it just works, the DB is connected to the app.
I've tried destroying the container and I've rebuilt the images from scratch as I thought that maybe something wrecked inside the container when I forcefully closed it, but got the same result.
Below you can see the logs of the container with the app.
Is there anything I am missing here ? Any other ideas to try ?
I see this weird closing connections log being logged 4 times. And I have no idea if it could be because of this.
Anyone knows what this java-sdk-http-connection-reaper is ?
Closing connections idle longer than 60000 MILLISECONDS
If I start the application with some IntelliJ configuration it simply starts with no delay, it connects to the dynamodb container with no issues. (see the screenshot below)
Thank you! Any help is appreciated.
Solution 1:[1]
The delay was caused because I executed the jar with java -jar. The solution was to have the entrypoint as mvn spring-boot:run
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ib23 |


