0

I have some Fargate container running a backend application, I'm using awslog driver so I can get STDOUT and STDERR in CloudWatch, that works perfectly, but now the application is failing with some funny error "ENOSPC: no space left on device, write" (which is related to npm), and as some folder is full I can't keep working.

In CloudWatch I have not syslogs "/var/log" from the containers to analyze and understand the root of the issue, so Neither do I know what is being written (like temp files or a massive log) nor where, in order to maybe set some crontab to clean up or perhaps to solve it at the code level after checking the syslog.

I wonder if anyone has been able to send /var/log (syslog) from the container to CloudWatch and how it was accomplished?, thanks.

farp332
  • 728
  • 2
  • 12
  • 31
  • 1
    You can use something like this in your entrypoint script to export syslog to container stdout. `tail -F /var/log/path/to/logfile &` `start your application command &` `wait $!` Here's related answer https://stackoverflow.com/a/44222911/4479254 Also, Fargate allows only 10 GB or 20 GB storage. It depends on platform version https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-task-storage.html Code with formatting https://pastebin.com/VAv7RMTc – zahorniak Jul 09 '20 at 13:43
  • @vallgorr Thanks for your input, I will check this and let you know the results, cheers :-) – farp332 Jul 09 '20 at 21:28

0 Answers0