ruby on rails - Transfer log files from root to ephemeral memory in Amazon EC2 -


I have put my Ruby on Amazon App 2M1 large (64 bit) example on Rail App / Website. I am using Nginx and Thin server because the application and webserver resp. Now the website has gone live and it is producing many requests and so log in. I have placed the application on the root directory and the problem I am facing is that it has 7.5 GB space and it can end in a few days.

I really want to take the log file for short-term memory / mount from the application so that it does not give any memory issues. Although I do not want to take the whole application in temporary memory as it is unstable and it can result in data loss.

Can anyone tell me whether it is possible to move the log file from the application only to the fleeting memory?

Please help me.

First of all, place where you / mnt drive < Pre> sudo mkdir / mnt / logs sudo chown Ubuntu / mnt / log / Pre-

Now, remove the local log folder from your app (When your app and ngnet are low, of course)

  rm -r / my / app / log   

and Create a softlink / lnt>

at the location on the / mnt

  ln -s / mnt / logs / my / app  ngnix  log directory To receive it can.  

You can now start your server again, the log will be saved to / mnt / log / .

However, I would like to note that it should not change the need to rotate those logs - use to ensure that your log files are properly handled.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -