Student storage quota preveting assignment submissio

80 views
Skip to first unread message

Christopher Bennell

unread,
Jun 15, 2016, 5:25:55 PM6/15/16
to Canvas LMS Users
Hi Folks, 
We appear to be having a problem with student assignment submissions. If a student is over their storage quota, the submission fails: 


I'm under the impression that this shouldn't happen. Is anyone else seeing this? I wonder if it's specific to local storage rather than S3. 

Here's the request, response and rails log: 

Response: 
Cache-Control:no-cache, no-store, max-age=0, must-revalidate
Connection:keep-alive
Content-Type:text/html; charset=utf-8
Date:Wed, 15 Jun 2016 21:22:23 GMT
Pragma:no-cache
Server:nginx/1.8.0
Set-Cookie:_csrf_token=...; path=/; secure
Status:400 Bad Request
Transfer-Encoding:chunked
X-Canvas-Meta:o=files;n=create;t=User;i=100;b=1048684;m=1048684;u=0.04;y=0.01;d=0.02;
X-Canvas-User-Id:10000000000100
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-Powered-By:Phusion Passenger Enterprise 5.0.28
X-Rate-Limit-Remaining:600.0
X-Request-Context-Id:a488e797-ac09-48a1-8d61-32f298e7e257
X-Request-Cost:0.05630527599999205
X-Runtime:0.069466
X-Session-Id:b84221290e3e7b4bd37c981e1a72c0a9
X-UA-Compatible:IE=Edge,chrome=1
X-XSS-Protection:1; mode=block

Request: 
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, br
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:109740
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryhOmvjE3pFdyNaQBb
Cookie:...
DNT:1
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Log: 
2016-06-15T17:06:03-04:00 Started POST "/files/pending" for 192.168.3.33 at 2016-06-15 17:06:03 -0400
2016-06-15T17:06:03-04:00 Processing by FilesController#create_pending as JSON
2016-06-15T17:06:03-04:00 Parameters: {"name"=>"classlist.pdf", "on_duplicate"=>"rename", "attachment"=>{"intent"=>"submit", "asset_string"=>"assignment_127841", "filename"=>"classlist.pdf", "context_code"=>"course_21349", "duplicate_handling"=>"rename"}, "authenticity_token"=>"...=="}
2016-06-15T17:06:03-04:00 Completed 200 OK in 138ms (Views: 0.7ms | ActiveRecord: 37.8ms)
2016-06-15T17:06:03-04:00 [STATSD] (total: 138.21) (view: 0.70) (db: 37.76) (sql_read: 21.00) (sql_write: 2.00) (sql_cache: 1.00) (active_record: 51.00)
2016-06-15T17:06:03-04:00 [STAT] 1181196 1181196 0 1181196 0.09000000000000341 0.0
2016-06-15T17:06:03-04:00 Started POST "/users/100/files.text?duplicate_handling=rename" for 192.168.3.33 at 2016-06-15 17:06:03 -0400
2016-06-15T17:06:03-04:00 Processing by FilesController#create as TEXT
2016-06-15T17:06:03-04:00 Parameters: {"attachment"=>{"folder_id"=>"", "unattached_attachment_id"=>"2175547", "uploaded_data"=>#<ActionDispatch::Http::UploadedFile:0x007f8d2f506748 @tempfile=#<Tempfile:/tmp/RackMultipart20160615-3474-1emilob>, @original_filename="classlist.pdf", @content_type="application/pdf", @headers="Content-Disposition: form-data; name=\"attachment[uploaded_data]\"; filename=\"classlist.pdf\"\r\nContent-Type: application/pdf\r\n">}, "check_quota_after"=>"0", "Filename"=>"classlist.pdf", "key"=>"/var/www/canvas/releases/20160614185920/tmp/files/0217/5547/classlist.pdf", "acl"=>"private", "Policy"=>"...", "Signature"=>"IWDlU2nbGaV/...", "content-type"=>"application/pdf", "duplicate_handling"=>"rename", "user_id"=>"100"}
2016-06-15T17:06:03-04:00 Rendered text template (0.0ms)
2016-06-15T17:06:03-04:00 Completed 400 Bad Request in 65ms (Views: 0.7ms | ActiveRecord: 17.3ms)
2016-06-15T17:06:03-04:00 [STATSD] (total: 65.50) (view: 0.71) (db: 17.32) (sql_read: 8.00) (sql_write: 0.00) (sql_cache: 3.00) (active_record: 9.00)

Christopher Bennell

unread,
Jun 16, 2016, 10:29:32 AM6/16/16
to Canvas LMS Users
So it looks like the changes introduced in this commit are effecting assignment submissions for us. I'm not sure what "direct legacy uploads" refers to. Is there a "new" upload method?

Jeremy Stanley

unread,
Jun 16, 2016, 12:49:46 PM6/16/16
to Canvas LMS Users
Good detective work.  It does indeed appear that this commit (which remedied a failure to check user quota in a place where we should) caused a regression here when using local file storage.  I'll work on a fix and post here once there's a commit on Github.

The "new" upload method refers to the Canvas API: https://canvas.instructure.com/doc/api/submissions.html#method.submissions_api.create_file

Christopher Bennell

unread,
Jun 16, 2016, 12:54:31 PM6/16/16
to Canvas LMS Users
Thanks! 

Christopher Bennell

unread,
Jun 29, 2016, 11:20:18 AM6/29/16
to Canvas LMS Users
Hi Jeremy, thanks again for addressing this issue. Do you have an approximate ETA for the fix? 


On Thursday, June 16, 2016 at 12:49:46 PM UTC-4, Jeremy Stanley wrote:

Christopher Bennell

unread,
Jul 11, 2016, 4:45:55 PM7/11/16
to Canvas LMS Users
Just checking in. Thanks. 

Jeremy Stanley

unread,
Jul 21, 2016, 3:07:13 PM7/21/16
to Canvas LMS Users
The fix just hit the beta branch and is due for release on August 6.

https://github.com/instructure/canvas-lms/commit/6a48e8eb8ad007d0b91966b80f9369a76fe90ce0
Reply all
Reply to author
Forward
0 new messages