Problem!: Instagram "Reels" Runs Out of Memory on Chrome

Share

Recently, I noticed that trying to access the "Reels" section of Instagram from a web browser on the PC will crash the tab as Instagram just eats so much RAM so quickly it runs out of memory.

The problematic URL is [https://instagram.com/reels/].

A message that reads: "Aw, Snap! Something went wrong while displaying this webpage. Error code: Out of Memory." A link: Learn more.
The message that appears in Chrome when a tab runs out of memory.

It seems that if you access it without logging in, it doesn't run out of memory, but it will tell you to log in. If you log in, it runs out of memory. Fascinating.

For the record, for me all other pages work, including "Explore." In fact, I'm not even sure what is the difference between "Explore" and "Reels," because "Reels" doesn't load for me while I'm logged in. It seems like some sort of TikTok clone? With just the videos displayed? Why isn't this a filter in "Explore," so you can choose whether to explore images and videos, only images, or only videos? And what is it doing differently from "Explore" that makes it crash? I don't really follow anyone on Instagram, so my home feed is full of random recommended posts, and it seems that 100% of them are videos. If I didn't know better, I would think Instagram doesn't even let you upload images. It kind of feels like what happened to Imgur.

As the "Reels" page loads, it appears blank for a while and unresponsive (frozen). This suggest that a lot of processing is being done in Javascript without releasing the control back to the browser. This is honestly amazing and it makes me wonder what could Instagram possibly be doing to crash the tab like this. I don't think I've ever had a tab run Out Of Memory in my life (although I did have OOM errors with programs I wrote). This is a first!

The reason why it's amazing is that if Instagram is running out of memory that's because it's putting some data in memory, and that data needs to come from somewhere, presumably Instagram's servers. The way Javascript works is that for Instagram's program to download data from a server, it must begin the download after an "event" (e.g. the user clicked a button), and after that there is nothing for the Javascript to do anymore until the data is downloaded. It's the browser that processes the download, not the Javascript. After beginning the request, the Javascript must "release control" back to the browser, then when enough data is downloaded, the browser will send the data it processes back to Javascript. This cycle ensures that the browser routinely has control, and while it has control, the tab is responsive as the browser can process input events. For the tab to become unresponsive, the Javascript code must be running constantly without releasing control back to the browser. Considering that this should be impossible under normal circumstances, I'm assuming Instagram uses some advanced Javascript feature that lets it handle the downloaded data immediately, or that an error in the programming led it to create more data than it has downloaded in an infinite loop.

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments (1)