Maximum data storage in an XBlock

18 views
Skip to first unread message

colin.fr...@gmail.com

unread,
Apr 24, 2019, 6:33:21 PM4/24/19
to General Open edX discussion
Hi, everyone!

We're looking at creating an XBlock where our learners can journal on specific topics, or make rough drafts of written works. Luis Duarte mentioned to me that he heard there's a maximum storage amount per field in an XBlock, so I wanted to see if anyone knows what it is. If it's, say, 640k, then we're basically all set. If it's, say, a few tweets worth, then that's a problem.

Anyone know?

David Ormsbee

unread,
Apr 24, 2019, 6:52:44 PM4/24/19
to edx code
We don't actually enforce any limits as far as I know, and it's bitten us badly in the past. XBlock will let you make fields that large and serialize them to MySQL, but you'll start getting performance issues if you start doing it on a frequent basis. We have had partial outages because one block type was storing 2MB blobs of user state in a popular course.

If you do need something user-state related that is this big, you might want to look into using the Filesystem field. This field can be a little weird for typical use, because it's basically a window into a file system instead of a simple value and it doesn't use the courseware_studentmodule table like everything else. But it will store things in S3 or some other pyfs-configured storage, and save your MySQL instance from getting pounded quite as hard.

Take care.

Dave

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/36804165-a054-45e8-8a5d-02f835e89b96%40googlegroups.com.

Colin Fredericks

unread,
Apr 24, 2019, 10:20:36 PM4/24/19
to General Open edX discussion
Thanks. Since we're hoping to get this XBlock folded into edx.org, we definitely want it to play as nicely as possible.

You received this message because you are subscribed to a topic in the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/CAO_oFPwhDUV7JZk2v%2BRcaeM6W0-OY5P8gWNsEuxrGX%2By2%3DC1-Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages