Showing results for 
Search instead for 
Did you mean: 

Group search is very slow when having large number of groups

I am writing this post as I think it might be useful for other Canvas-users, but I am also interested in hearing others experience with courses with large amount of students and groups.

We are planning to have a MOOC for norwegian teachers. There will potentially be tens of thousands of users in one course. We were thinking of splitting the students in small discussion groups, f.ex. one for each school, in which they

self register. I tried creating a couple of thousand groups in a test course. I named the groups "Studiegruppe nnnn", where nnnn is a a number from 1 and up. Then, as a student, I went into /groups for the course.  I started searching for the substring 178 to see how fast groups containing that substring would turn up. It took a lot of time, as can be seen on the enclosed video, and to my surprise it looks like Canvas does the search on the client side by downloading groups ten by ten, as is shown in the network inspector in the video.

This video is currently being processed. Please try again in a few minutes.
(view in My Videos)

During the search, the "busy-indicator" was visible for some seconds but then disappeared. However, by looking in the network-inspector one could see that the browser kept fetching new pages with 10 groups until the screen was filled up with matches. Scrolling down then initiated fetching of new groups to see if there where more matches.
I have been thinking all along that Canvas can handle large amount of students, sections and groups in a course, but I am started to get worried. Will Canvas be able to cope with say 30 000 students in a course, or will there be unexpected consequences. What is the recommended way to test it. I am considering adding 30 000 test students in a course and see how it behaves. Does anyone else have experience with this large amount of users in a course in Canvas?
3 Replies

We've solved the slow group search problem by creating a LTI that handles the group enrollment. The source code for the LTI is available here: GitHub - matematikk-mooc/kpas-api: KPAS backend We hide the Canvas groups from the student with javascript to force the student to use the LTI for group enrollment.

The LTI stores the Canvas groups it creates in it's own database such that it can do a fast lookup of groups and check if a group exist. If it does exist, the user is enrolled in the existing group. If the group does not exist the LTI creates it and enrolls the user in it.


We are now experiencing a problem where a content page takes 4-6 seconds to load. That is the TTFB (Time To First Byte). I know Canvas has hosted courses with large number of users before. The course "Doing journalism with data"  had 20-30000 users as far as I remember from the Canvas conference I attended in London in 2014. Currently we have 19365 users and 2403 groups(schools) in our course. 

We've asked Instructure for help to solve the high TTFB, but I am also trying to reproduce the problem on an open source Canvas installation running in Docker on my own computer: GitHub - matematikk-mooc/backend: Install Canvas docker server. 

I have made a javascript that creates a lot of users and groups in a course. I first tried creating 10000 users and 2000 groups. The content pages still loaded fine, approximately 500 ms TTFB. I did not put the users into the groups, so I have now modified the script to create another 10000 users and add the users to the 2000 groups as well. If that makes the TTFB go up, the plan is to look in the server log files to figure out what takes time. But I first and foremost hope that Instructure can fix the TTFB by adjusting something on AWS (Amazon Web Services).

On the course we have in production we have 5 group categories: county, community, school, community leaders, county leaders. Currently we have group discussions for school leaders in the county leaders category and for teachers in the community category. We're maybe not going to use the school category, but we would like to use that group to create course progress statistics for the schools. We cannot use sections for this because I tried creating 6000 sections in a test course, and from the server log I could see that Canvas made a SQL (Structured Query Language) call to the sections table in the database that took a long time to answer. I could not see that such a call was made for the groups table, but it could be because I had not populated the groups with users.

Right now the script is populating the database on my local machine (the fan on the computer is running hard Smiley Happy). Then I will update this thread with what I find.

If anyone has suggestions on why the content page loads so slowly, please reach out!


Instructure fixed the problem 14 days ago and I forgot to update this thread! The slow loading was caused by a slow database lookup for pages having "Mark as done" as criteria. The code was not optimized for large number of students, but now it is. We are having over 27000 students in the course now, and it works fine. There are still some problems (long load times) to be solved when using group discussions with large number of groups, but it is not critical at the moment for us.