I keep getting this error message: “Some items in your database exceed 10MB. This can slow down your application considerably. You should save this information as a file.”
I don’t understand what it means. Does it refer to items saved to bubble’s s3? or actual database items? My database items don’t contain any images, just the URL to the images right? How can an item (even with 100 fields) be over 10mb?
And how do I find which database items are over 10mb? And once I do, how do I convert it to a file?
If it does refer to things saves to bubble s3, how do I convert it to a file, it already is a file?
I’ll bet you’re storing images in rich text in your database, and these images are stored as base64 in the text/content field of your data type. Would that be right?
If so, images should be stored as URLs, NOT base64. You need to find a rich text editor plugin that will do this for you as not all do and it leads to atrocious loading times. You also, ideally, need to convert existing base64 formatted images to being stored in Bubble storage rather than DB. I did this for a client’s app after an audit found this issue, using a custom Python function (get entry from DB → extract base64 images → upload to Bubble file manager storage → replace base64 images with new file URLs in DV). I’m happy to send that to you if it helps.
1 Like
Also, on this, if your field type is ‘file’, you are correct that this is essentially a URL. The file is not stored in the DB, but in a different area for file storage.
Similarly, if you have rich text like
that also just stored the URL, not the file. Problems arise when the file is encoded as text and stored directly in the text field (likely as base64, which can be millions of characters long).
that must be it. I do recall having to convert images to base64 to get some plugin to work last year. But is there an easy to way to find these large database items? I can sort my s3 items by size, but don’t see any method to do so for my database.
Nope, one by one technically speaking. Unless your DB is small and you use an advanced filter This Thing’s content number of characters > 100000 or something to display the relevant unique IDs, but that could crash the browser