When I do tomcat restart in amazon ec2 linux then EBS space increases to 3-4GB
0
votes
0
answers
45
views
There are 5 servers in our autoscaling which are our live servers. Out of them 2 server facing out of storage issue related to Elastic block storage (EBS). So I have done research on which directory taking space what was the initial space just after initialization then till the out of memory issue come.
Then again checked dir struc where space is gone ...Same struc is there not visible that any dir have taken 3 4 gb. but when one day I restarted my tomcat space increased to 3 4GB.
I dont have any idea why its happening ? my tomcat service file location is /etc/system/systemd/tomcat.service. Then tomcat dir location is /usr/share/tomcat/ . I have removed unwanted files, packages to get 5-6GB out of 12gb of EBS.
Then I used that LT to my autoscaling. Still after 4 5 or 7 days space becomes zero. Then I need to do manual autoscaling to get the new server with 4-5GB of space. I want its root cause of storage issue. Please help me.
I tried to get the details of whole dir struc and space using df -h and du -h command. Then also noted down those dir struc with space after new initialization using command sudo du -h --max-depth=1 /opt/ | sort -rh* then again checked after 4 5 days but space not increased in any of the dir in whole ec2. Means there might be no physical files are accumulating on my server. For example at the start When i do check space
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 488K 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/nvme0n1p1 12G 6.4G 5.7G 53% /
/dev/nvme0n1p128 10M 3.8M 6.2M 38% /boot/efi
tmpfs 793M 0 793M 0% /run/user/1000
then after space becomes zero I am able to see only
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 488K 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/nvme0n1p1 12G 12G 20K 100% /
/dev/nvme0n1p128 10M 3.8M 6.2M 38% /boot/efi
tmpfs 793M 0 793M 0% /run/user/1000
and same dir struc i got when sapce was 5.6 GB arround . I am not able to find that any dir has taken that much space all were at the same size but the space was gone. But when i do tomcat restart space increases to 4-5GB again.
Asked by Nandkishor Bobade
(1 rep)
Feb 11, 2025, 09:52 AM
Last activity: Feb 11, 2025, 12:23 PM
Last activity: Feb 11, 2025, 12:23 PM