Hi Tech buddies ,
My name is Kiran Vajrapu, and I am from ThoughtWorks.
I want to share a tech topic from my previous project and the topic is memory outage issue in the project when we are using the Spring Bean from spring framework with Java.
Previously, I worked in an engineering firm where the majority of the employees were non-IT; it was startup culture.We left defunct beans in scope at the start of the project, and the team is constantly creating beans in the project to meet dynamic requirements.
Based on the requirements, the number of beans in microservice or project is growing. Mainly, these beans are used to parse the data from Excel files for business logic purpose.
We never faced any performance issues on the server side, but we faced issues on the developer machine and the reason is “In a garbage collected environment singletons can quickly become an issue with regard to memory management.”
While running large Excel files, RAM fills up and the machine hangs. So my team leader suggested that I change the scope of bean.
Perhaps sharing this scenario is silly, but I was fresher at the time. I didn’t have proper training on springboot and didn’t know about the scope of the bean at that time.
However, after conducting research and learning about scope types, advantages, and disadvantages.
I am new to blogging and content creation; please correct me or suggest something if I did anything wrong.