Anyone have crashes with too many tabs open?

Can you tell us your extensions ?
–>

grep -oP '},"name":"\K[^"]+' ~/.mozilla/firefox/*.*default*/addons.json

And how your Memory & swap is managed :

free
swapon -s

You can already optimize tab memory management with firefox option :
about:config and set browser.tabs.unloadOnLowMemory to true
Unused tabs wil be unloaded (they are still there, but you’ll have to reload them to use them)

2 Likes

I’m having a similar issue. It doesn’t seem to be totally related to the browser but it most frequently happens when I have many browser tabs open or I am also running a game (usually World of Warcraft) when I go to open the browser. I have 8GB of RAM and also don’t have a swap set up on my main drive. Can I safely set up a swap on some of the free space on the drive to prevent further crashing?

Thanks so much!

Yes, you can setup a swapfile. No need for a partition. You can also use systemd-swap insetad. It will create swap files as necessary. Setup info is easily available.

Swap file

systemd-swap

EDIT: but first you should make sure lack of ram is the problem. Monitor your ram usage with free, for example.

2 Likes

Thanks! I’ll try to monitor first before I make any changes. I have also run memtest with no errors (although I need to run it for more passes to be sure). So, alternatively it could be a drive issue but it’s a fairly recent SSD (just over a year old). Anyway, I’ll update if I find anything else.

Thank you again!

Or not. It can be just a normal behaviour of getting out of mem.

I only have 4GB of memory, and I always set up swap, but frequently if I have several tabs, or a really large Google Doc open, it seems as if my system has crashed. However, I think it is really just thrashing, and sometimes if I come back in a couple of hours, I can get control back and close some tabs.

The problem is that while the system is thrashing, I cannot get enough resources to (say) open a konsole and run top, to give decent diagnostics or even systemctl reboot to just give up. I either have to wait (sometimes up to several hours), or hit the power. The laptop I use most frequently has a broken SysReq button, so I have not enough data points to say how REISUB will work while thrashing.

1 Like

Swap - Manjaro Linux (weird that there’s no preview on this link)

1 Like

I had another crash this morning and confirmed that I was running our of RAM. I had accidentally stopped free but between stutters was able to get in running again. The system was down to 64MB remaining and wouldn’t refresh beyond that. @mparillo has a good point-- I’ve never waited to see if it would resolve. If it needs longer than 30 seconds to become responsive, I’ve assumed that it’s a full crash and just hard boot. Most crashes have also happened following coming out of sleep so I’m hoping a swap will help with this as well. I have created a 8GB swap and hopefully that is the end of my troubles!

Thanks for all of your feedback and suggestions, everyone. Much appreciated.

The system will certainly come to a crawl once RAM gets full. I tend to keep a Konsole tab open with watch -n5 free running so I can do a regular check.

YouTube is definitely, in my experience, about the worst culprit. Watching a few videos quickly swamps the RAM. But I do have quite a number of tabs - with up to a few dozen loaded. Currently 1272 open across various groups.

NOTE: this is Waterfox (a Firefox fork) which may behave differently.

Thanks for that very useful tip. I’ll try that & see how it goes. Hopefully will save having to restart the browser to reclaim the RAM.

Depending on how hard your boot was,please read this:

also know that swap isn’t “free”: it comes with severe system degradation (sloooooow) so unless you have a lot of patience, the real solution it to use fewer tabs, or to upgrade your RAM.

:innocent:

:roll_eyes:

Have you ever heard of shortcuts? It’s way more efficient to store lists or folders with links.

Maybe this extension (or similar), might help:

Thanks to all for the replies. To keep it short, I’ll just say that I have used the advice in this thread to determine that it is indeed a lack of RAM that is causing the crashes. When I built the system (from circa 2011 ebay parts) I thought that surely 8Gb would be enough because I don’t game on this system, and I don’t do any real work on it besides writing/word processing.

I will put more ram in the system. Thanks to all for the help

I’ve having some lock ups lately and I have push the reset button and reboot back in. Maybe I have the same Issue here?
However I have 16GB of RAM.

Sometimes it doesn’t even work to hold down the power button, when doing a hard reset. So I just yank the cord out of the back of the computer. Other than losing your work (which it seems you would anyway) how is this a bad thing? I don’t think I’ve ever had any problems doing a hard reset. It seems to recover just fine. Again you lose any unsaved data, but I have backups in place (Tresorit) and many of us are using internet services. In my case it’s Grammarly, which autosaves after every new word you type.

I guess I’m just curious as to why doing a hard reset is a bad thing. Never had any problems.

It depends on your file system and your application…

  • FAT: everything gets written to buffers and any buffer not written to the disk is lost or worse: half a file gets written and the rest of the file cannot be read any more without forensic tools.
  • NTFS: That’s a journaling file system with a USN Journal and depending on the version it will be more (or less) robust because transactions get written into the journal first and if the journal is not complete it will be rolled back until the last atomic transaction that did complete successfully.
  • EXT4: Also a journaling file system
  • BTRFS: aka BeTter File System: has journaling and redundancy built in but it needs to be activated

And then the application itself: LibreOffice saves a file first to a temp file and then deletes the original and renames the temp file to the original. As a delete and rename take a fraction of a millisecond, you either still have the unsaved file OR the new file, but applications like nano just overwrite the existing file unless you specify the --backup parameter, so you could end up with a partial file with the rest just lost.

Good that you have back-ups because you will run into trouble in the long run. Maybe not last year, not this year, but eventually you will… And guess what? small files are less susceptible to corruption, but large ones? Guaranteed failure for video files, database files GIMP files with tons of layers, …

:man_shrugging:

P.S. So you know about REISUB now, so just start using it. Don’t continue on your path to (corruption) hell… :innocent:

Hmm… it sounds like I’ll usually end up reformatting the computer before it ever becomes a problem. However I’d like to keep this Manjaro install for as long as Manjaro stays good. If they start falling off like Mint or some of the others, I may switch to a distro that’s doing well at the time. Pretty common problem with software, but back on topic:

Is editing grub completely necessary for your method? I’ve generally had bad experiences with grub and I’ve learned to just leave it alone and we get along fine. I leave it alone and don’t mess with it, and it doesn’t start acting funny and giving me problems. It’s a nice arrangement we have. I’m something of a linux newbie so I must admit that I don’t understand everything in your how to guide.

Speaking of file system corruption, maybe I need to get up to date with backing up /home…

If you see the grub menu at boot, you don’t need to do anything.

As long as you don’t make a mistake in copy-pasting / changing there is no risk as that’s from my grub.

Ask where you get stuck! :innocent:

And if you’re afraid of crashing your system, you should definitely read this:

Definitely read this one too:

:+1: