Help with managing Canvas LMS log files.

1,715 views
Skip to first unread message

Lakshmanan Sornanathan

unread,
Sep 12, 2016, 8:32:23 PM9/12/16
to Canvas LMS Users
Hi everyone. I've setup Canvas LMS on AWS for production use. It has been setup on Ubuntu 14.04. Currently there are around 200 students using the system. Even with a small number of users, I noticed that the Canvas log files (production.log & delayed_job.log) gets large quickly and fills up the disk space. So far, I have been increasing the size of the EBS volume each time the system gets low on disk space. This means I have to stop and start the EC2 instance each time I do this, which is not an ideal solution in production. I also need to keep the log files for N number of days before deleting it. Just wanted to get some advice on what sort of options would be good for managing the Canvas log files.


Kind Regards,
--

Lakshmanan Sornanathan

Education Technologist

Swinburne Online

Ross Gailer

unread,
Sep 12, 2016, 8:47:07 PM9/12/16
to Canvas LMS Users
What is your log level set to? It is found in config/logging/yml. I have mine set to info unless there is an issue I am trying to sort. I then have the logs included in the logrotate cron job to roll them over and retain as required.

Ross
PLC Armidale


Lakshmanan Sornanathan

unread,
Sep 12, 2016, 9:27:10 PM9/12/16
to Canvas LMS Users
Hi Ross,

I did not configure the logging.yml, which means Canvas would be using the default setting right? Do you know what those default settings are? I'm new to Canvas and had it set up
following the production installation guide on from Canvas LMS wiki page. So haven't played with most of the config files except for the ones indicated in that guide. There are other settings for the logging.yml file such as logger, app_indent, daemon_ident, include_pid and facilities. Do you know anywhere I could get more details on what these settings are and the options it accepts?

Thanks for pointing out about the logrotate. That would definitely help with the disk space. Have you also got Canvas LMS setup on AWS? Just asking, because wanted to know if it would be possible to set up logrotate to push up the log files into a S3 bucket in AWS or best to keep it on the instance volume itself?


Kind Regards,
--

Lakshmanan Sornanathan

Education Technologist

Swinburne Online




Ross Gailer

unread,
Sep 12, 2016, 9:31:15 PM9/12/16
to Canvas LMS Users
Running from memory I think the default is debug, produces a lot of output.

No, not running on Amazon. I have it on a local Hyper-V instance.

Ross
PLC Armidale


Graham Ballantyne

unread,
Sep 13, 2016, 2:27:14 AM9/13/16
to canvas-l...@googlegroups.com
Definitely look at your logging.yml config. We've got ours set to info. The logger, app_ident, daemon_ident, include_pid and facilities items are all syslog-specific settings. If you're not using syslog, then don't worry about them. We do use syslog; our config looks like:

production:
  logger: syslog
  log_level: info
  app_ident: canvas-lms
  daemon_ident: canvas-lms-daemon
  include_pid: true
  facilities:
    - user


We configure rsyslog on our app servers to forward their logs to one of our management (delayed jobs) servers, which then forwards the combined logs to our central logging server. That way we only have one (giant) log file to look through, instead of 20.

In your case, `logrotate` will be your friend. Use logrotate to rotate them off daily and keep a reasonable amount for debugging/troubleshooting/forensic purposes.t

Graham.


--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Graham Ballantyne
IT Services
Simon Fraser University

Lakshmanan Sornanathan

unread,
Sep 13, 2016, 11:11:37 PM9/13/16
to Canvas LMS Users, gra...@sfu.ca
Hi Graham,

Thanks for the advice on the logs. I didn't think about when there's a few instances running and having more than one log file. Sure it will be more efficient combining all the logs to a central location like you mentioned.

Got a question about the database config. I've come across some installation guides for Canvas where they create a new db for the queue and the configuration file looks something like this
:

production:
 adapter: postgresql
 encoding: utf8
 database: canvas_production
 host: localhost
 username: canvas
 password: password
 timeout: 5000
 queue:
   adapter: postgresql
   encoding: utf8
   database: canvas_queue_production
   host: localhost
   username: canvas
   password: password
   timeout: 5000

But this configuration wasn't covered in the Production Setup guide by Instructure. Is it a valid option for the database config? I did try this option when initially setting Canvas but the initial db setup didn't create the database 'canvas_queue_production'. After that, wasn't sure if there's some steps that I've missed or it's not a supported option.


Kind Regards,
--

Lakshmanan Sornanathan

Education Technologist

Swinburne Online



Graham Ballantyne

unread,
Sep 14, 2016, 12:01:10 AM9/14/16
to Lakshmanan Sornanathan, Canvas LMS Users
The Production Start guide is correct. The queue used to be in a separate database but it was moved into the main Canvas database several months ago.


Diego Tejada

unread,
Feb 5, 2020, 2:32:42 PM2/5/20
to Canvas LMS Users
Thank you so much Lakshmanan,

Your suggested logging.yml config worked perfectly, it was also necesary to restart Apache and Canvas proccesses.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-l...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages