My spring boot application becomes slow after 1-2 days when I deploy it on production server. I'm using AWS EC2 instance. In start the speed is fine, but after a couple of days I have to restart my instance to get back the desired performance. Any hint what might be wrong here?
Asked
Active
Viewed 2,794 times
-2
-
1A lot of things. – Shanu Gupta May 23 '18 at 05:44
-
Like what? Any example please – Muhammad Ahsan May 23 '18 at 11:06
2 Answers
1
Have you check for memory leakage in application as it is nothing to do with EC2 instance. As you mention it was working fine after restart.
It is not best practice to use embed server on production.
I would suggest you should use AWS Elastic Beanstalk service for deploying spring boot application, there is no additional charge on it.

Mody
- 11
- 2
-
Can you recommend some ways of checking & resolving memory leaks? – Muhammad Ahsan May 23 '18 at 11:06
-
`It is not best practice to use embed server on production` can you explain why? – Shanu Gupta May 23 '18 at 11:54
-
https://stackoverflow.com/questions/39626267/spring-boot-embedded-container-or-war-file-in-an-external-container-for-producti – Shanu Gupta May 23 '18 at 11:56
0
Okay so after some analysis (Thread dumping of my tomcat server on production) I found out that there were some processes (code-smells) which were taking all of my CPU space, and hence my instance was becoming slow, and effecting the performance of my application overall.

Muhammad Ahsan
- 249
- 4
- 13