I have a old java application running on an AWS EC2 but a couple of times per week the application is very slow or down and I have to restart the system which is very bad for our clients. It's an old application and it's using a lot of the local file system and also has some cron jobs what Is a big constrain for adding a load balancer because we can't have multiple instances running behind a load balancer. The instance is not immutable. I know the solution is to remove these this local filesystem and maybe move the cron jobs to lambdas so that I can have multiple instance running the same application, but that will take time to achieve it.
Does anyone recommend a quick solution (even if temporary) that I could apply now to have a more stable or available system, so that I gain time to do the right changes? I'm already using a m1.xlarge instance.
I'm also already using new relic to monitor the system but it seems the slow transactions and errors that happen when system is very slow are more a consequence than a cause.
Thank you! Any help would be appreciated!