Spyke

Firefox becomes slow after a couple of weeks open

Does anyone have this issue were firefox becomes slow if left open for a long time. In my case after a couple of weeks rendering becomes slow and when I use youtube for example if is laggy, just trying to change volume taka few second to show the volume bar. It also happens to my laptop at work. I have around 30 tabs open.

https://bugzilla.mozilla.org/show_bug.cgi?id=1819286Open linkView original on discuss.tchncs.de

Most software in general has hard to detect issues after several weeks of uptime. Its something that's fundamentally hard to test and fix. Its a big reason why "did you turn it off and on again" is such universal advice.

56

Even if the software was perfect, virtually all desktop RAM isn't ECC equipped, so you potentially have even the hardware corrupting the state and requiring restarting because of that.

3
lemmy.world

I don't hold anything against you, OP, but... 30 tabs open for two weeks makes me feel yucky on the inside.

33
discuss.tchncs.de

Lol I open them to look at later, and I also open lots songs on youtube to listen to and switch between songs rather than reopen the songs over and over I just keep it open.

7
lemm.ee

You can bookmark webpages to come back to later and even organize them in trees by category. You can ceeate a playlist of songs from youtube and import it to a service with no ads like piped, then shuffle it. If you're willing to put up with 30+ open tabs these are much less time consuming than scrolling through the default way it situates tabs, AND there aren't 30 open tabs sucking your resources.

If you already knew all this, I'm almost sorry.

16

I'm almost sorry

Hahahahaha oh boy the comments here today are great!

(I'm one of those who never reboots, never closes Firefox).

3

Personally, if I bookmark something, the odds of ever getting back to it are very, very low, and so are the odds of deleting obsolete bookmarks of unread news etc. But the songs tips are great, I'll have to look into it, thank you!

And 30 tabs is very tame.

3

Oh, the 20 tabs thing is perfectly reasonable. But I'm one of those crazy people who completely shuts down his computer every night, including closing my browser. Been using computers for too many years to trust a browser to not leak memory.

5

Hahajahajaha

I have like 90?

Sorry, eh. (Yea, I know I shouldn't, but I'm lazy)

5
Oryginreply
sh.itjust.works

I have multiple Firefox windows with around 1-1.5k tabs on each, and they have been opened (and re opened) since about a year.
I ❤️ tabs, they make me feel all warm on the inside

3

Yeah, I get twitchy when I have more than about ten tabs open. My senior regularly has thousands, across multiple browser windows. There are two types of people.

1
Taasz/Woofreply
lemmy.blahaj.zone

Why is that unusual? The only time I close apps is when I restart for an update like once or twice a month.

3
lemmy.world

You can see the worst offenders in firefox by using the hamburger menu then more tools and Task manager. You can sort by ram. YouTube likes to hold gigs of ram for some videos. Close the biggest offenders and you'll get back close to normal speed.

18

Ding ding ding, the only good reply in this thread.

The symptoms described by OP smell like good old memory exhaustion.

5

In my experience this doesn't matter. Firefox just slows down if it's been open for long, regardless for how long the tab has been open for. Even if you unload all active tabs and open a new one, that new tab will still be significantly slower than it would be if you restarted the entire browser.

It's some kind of slow resource leak somewhere.

1
lemm.ee

My laptop with a non-critical service: Uptime: 9 weeks, 5 hours, 34 minutes

13
lemmy.zip

I've had Debian VMs run for long periods of time without me touching them. They normally would have high uptime unless it automatically reboots to apply a kernel update. The key is these are virtualized servers. You should absolutely avoid running to long without a reboot. The longer you wait the greater the chance of something breaking on the next boot. There is also the issue of memory fragmentation but that's not really an issue these days.

2
lemm.ee

I just have docker containers serving up some self-hostable service for myself.

I don’t think I’ve seen or heard of issues not rebooting for too long recently. Aside from not getting security updates or bug fixes, what would be some problems that could happen if a system has been running for too long?

2
lemmy.zip

It might not come back up after power loss.

Also you do want security updates. It is a bad idea to not install them.

0
lemm.ee

Could you elaborate on it not coming back up after a power loss? Assuming these services can get restarted after booting without the need for a user login, why and how would a previous long uptime lead to a possible failure of these services to be spun back up? I apologize if these questions sound dumb and have obvious answers, but I genuinely do not know, and it’s why I’m asking.

And I’m not in any way trying to say I don’t want security updates. I’m asking that aside from security updates and bug fixes, are there any downsides to a long uptime? Please treat the question as one of curiosity.

1
lemmy.zip

It can happen because of simple things such as a hardware failure or because the kernel was removed 3 weeks prior. Its unlikely but it always will come at the worse time.

Also rebooting after any update makes sure that all services have been restarted and are using the newest libraries.

0

I’m sorry but I fail to see how these problems would be tied to having a long uptime (note the inline code block, as I mean the output of that command instead of uptime in an SLA, which is typically described as high or low instead of long or short). I have yet to find mentions where long uptime leads to higher chance of hardware failures as of recent. If some critical library or the kernel was removed some weeks prior to a reboot, I don’t think long or short uptimes would change your encounter of these issues.

And security patches are good, I agree. But there are instances where you don’t need it, eg in an airtight infrastructure, meant just for internal users, of which has no access to the Internet. You fall back to more traditional approaches to security in such cases.

As far as whether a service is properly restarted due to library updates, in a containerized environment, you wouldn’t have issues with library version mismatches, or missing libraries, or any sort of failure to restart due to dependencies getting changed without human attention (note that you can automate container updates, but you are then putting trust into whoever is publishing that container).

I’m not sure if it’s a lack of understanding of what my question is asking, or some other reason, but if you would please take the time to carefully read my questions and answer more appropriately and with clarity, that would be much appreciated.

2

Lol, cause we're all lazy gits.

Cobbler's kids have the worst shoes. I'm the cobbler, and reboot when things start acting up.

4

Yes it happens. As others have said: just restart.

What might not be as clear: when you restart, if it doesn't just come up and offer to restore your session, you can go to History and Restore Previous Session. This reopens all your tabs (actually, they won't fully reload until you view them).

18
lemmy.sdf.org

Bookmarks are for really important stuff. Open tabs are for stuff I want to be able to easily stumble back upon, but I won't be butthurt if I dont.

There's nothing wrong with having more than one way to categorize stuff.

Edit: and considering that session data is also written to disk, there really isn't much difference between bookmarks and open tabs anyway.

13
lemmy.sdf.org

It doesn't. When you reset it, they take very little resources until you actually load them.

6

Most non-technical users do this and then complain to IT because their computer doesn't work well. That resource is wasted.

1
lemmy.world

If it's related to the thread you posted then try Nightly?

That's only in Nightly right now, unfortunately; it won't make it out to Release until v134.

Also, can I ask why you'd leave your browser open for weeks? Just curious of the use case. The thread mentions having 5700-7000 open tabs, and I can't fathom why someone would do that. It's not like the websites disappear if you close the tab. Nothing to do with the problem though, you don't have to answer.

13
lemmy.world

Also, can I ask why you’d leave your browser open for weeks?

This just begs the question, Why do you not leave it open?

4
.Donutsreply
lemmy.world

To conserve resources / power? Like when I'm done using an app, I close it. When I'm done reading a website or using online banking, I close it. I don't leave my email, games or music open after I'm doing using them either. I actually turn off / sleep my entire device when I'm done using it, but that's not what my curiosity is about.

13

So perhaps another anecdote is in order. I currently running three instances of Firefox (different profiles) on a low-end Celeron laptop. I don't usually shut them except sometimes by mistake. What I do do is close tabs, if only for simplicity's sake (because idle tabs are unloaded from memory anyway). I'm experiencing no sluggishness issues.

1
discuss.tchncs.de

I only have around 30 open and I don't turn off the laptop, after a while firefox becomes sluggish and I have to restart it.

3
sh.itjust.works

Have you tested with specific websites? Could it be a tab has some have JavaScript running constantly that’s causing the issue?

5
.Donutsreply
lemmy.world

You should try that nightly build for troubleshooting purposes

2

Also, because it forces you to restart the browser every night.

5

Under about:unloads, you will see a list of open tabs, sorted by resource usage. You can click-spam the "Unload" button until that list is empty, or until the most resource-intensive tabs are off the list.

This does not require any third-party dependencies, and the tab will still be present on top. The site will reload once the tab is selected again.

13

Close everything and start fresh

Your productivity shouldn't rely on keeping one piece of software running for long periods of time.

12

Firefox can automatically discard tabs when available memory gets too short. You need to configure it to do that though and probably disable the 10min minimum open time too if you're very short on memory.

5
s_sreply

FFS, his leak is probably in an extension.

Installing more extensions that might also leak is not a real solution, no matter what they do.

2

I had the same problem recently. Especially the youtube UI became very unresponsive and would take several seconds to respond. I have 96G ram...

I downloaded ESR instead. So far so good.

4

Only the part with youtube. Don't know if they are pulling some tricks on uBlock users, but about 10 tabs of youtube can get nasty, even with a somewhat recent workstation.

4

Try using a tab suspend extension, something like 'auto tab discard'. Firefox has one built-in, but it's not aggressive enough.

3

It's either you need more RAM or you must learn to use a tab group extension. Also, if it gets slow, just restart it.

Simple Tab Groups is a nice add-on.

My personal favourite is Sidebery. It has vertical tabs and easily navigatable via mouse wheel. You can even unload a tab. And has tons of customization options.

2

Check the RAM usage of each tab. My Firefox is constantly open at work, albeit with anywhere from 1-10 tabs, and it never gets slow. Only time I restart it is when Firefox updates.

2
mander.xyz

Dawg I had like ~35 tabs open and hadn't restarted my PC in over three weeks. Fucking Firefox was sucking back 80 gigs of RAM. 80 fucking gigs.

On the bright side all the tabs were still loaded when I clicked through them.

1
Atemureply
lemmy.ml

I've seen poorly made websites taking gigabytes of RAM before. It's not firefox' fault they do that.

10
Zettareply
mander.xyz

True that, I just thought it was crazy. I had recently upgraded to 96 gigs of RAM and I just never imagined a browser would actually suck up that much.

2

If you had 80GB worth of websites that did something actually useful with it, you'd want Firefox to use it all.

I usually have dozens of tabs loaded due to usage and I want Firefox to keep all of them into memory so that I can switch between them quicker.

Though I do also want Firefox to shed load by unloading some of them whe I need memory for something else. There just simply isn't a mechanism in Linux to do that AFAIK; Firefox will happily keep all of its tabs loaded all the way until OOM eventhough it could shed most of them with little impact on user experience. There isn't a way for the kernel to ask applications to shed memory load on their own and I think there should be.
macOS has such a mechanism and Firefox uses it but it didn't have much effect IME, so it might have been bugged. That was a good while ago that I tested it though.

Edit: I just found out that there actually is a sort of standard mechanism now: https://systemd.io/MEMORY_PRESSURE/
I don't think firefox implements it but it's also kinda new.

2
Atemureply
lemmy.ml

Servo won't protect you against shitty websites gobbling up memory.

6
discuss.tchncs.de

It will still lower memory usage considerably, Firefox uses way more memory than Chrome. Memory optimization is horrible in Firefox.

0
Zettareply
mander.xyz

I'm so hyped as well! Just read their monthly update blog today actually! I'm mostly hyped because it's the first actual new web browser in a very, very long time, and that's just plain exciting!

1

There are two new browsers coming Servo written in Rust and Ladybird (web browser) written in Swift. Lets see which one will win. Ladybird alpha is coming in 2026 and they have more funding.

3

Oh awesome, I didn't even know about this other project. Thanks for letting me know.

1

Come on 30 tabs is nothing, read the bug report. The guy in the bug report open about a 1000 in totals, I don't even know how to keep up with that many tabs.

6
aardreply
kyu.de

I currently have a bit over 2400 tabs open, and it has been roughly a month since I restarted firefox for being too laggy. It is becoming an issue again.

2

No one can help him. We tried. He has more Firefox tabs than days left on earth. It's horrible, and I'm looking forward to visiting him one day and resetting everything.

2