Posted: Fri Jun 26, 2015 14:44 Post subject: Lockup under heavy load
Every time I try to download a popular torrent the router ends up freezing up, no auto-reboot or anything. I've tried messing around with Maximum Ports, TCP Timeouts.
Here is what I'm running:
Build: 27453 (06/25/15)
Router: Buffalo WHR-HP-G300N
Maximum ports: 2560 (doesn't seem to do much in terms of stability)
TCP timeout: 400
UDP timeout: 120
Web Access disabled. (to save some memory)
Now the weird part is that it crashes (at least according to top) even when there is still a lot of free memory.
Anyone have any idea what's going on? Can I find some error logs in the router?
Below I added the final top update for 3 tries with different Maximum port variables:
Use the following:
Maximum ports: 16384
TCP timeout: 3600 (Default)
UDP timeout: 120 (Default)
If you still have issues, then flash back to 27396 or wait for the new build 27456+
Builds 27413-27453 have all kinds of issues, see the changelog in my signature for more details. _________________ THERE ARE NO STRANGERS HERE; ONLY FRIENDS YOU HAVEN'T YET MET.
________________________________________________________________________________________________________
DD-WRT CHANGELOG | DEVICES | DD-WRT BUILDS | KONG BUILDS | UNOFFICIAL BUILDS | DD-WRT in VIRTUALBOX
Use the following:
Maximum ports: 16384
TCP timeout: 3600 (Default)
UDP timeout: 120 (Default)
If you still have issues, then flash back to 27396 or wait for the new build 27456+
Builds 27413-27453 have all kinds of issues, see the changelog in my signature for more details.
Tried your settings, but it still crashed. Flashed 27396 and it still ends up crashing BUT it took a lot longer, so it sure is more stable.
Though the TCP timeout of 3600 seems long, shouldn't around 400-460 be enough?
EDIT:
Oh and I flashed without resetting settings, should I try resetting them?
Also this run, top showed more or less the same:
Mem: 18252K used, 11164K free, 0K shrd, 1964K buff, 5868K cached
CPU: 0.0% usr 0.3% sys 0.0% nic 54.7% idle 0.0% io 0.0% irq 44.8% sirq
Joined: 03 Jan 2010 Posts: 7568 Location: YWG, Canada
Posted: Fri Jun 26, 2015 17:10 Post subject:
watch the free ram as it freezes till it freezes, does it run out? copy/paste into a txt file the output from "dmesg" command as it starts freezing again _________________ LATEST FIRMWARE(S)
BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers
watch the free ram as it freezes till it freezes, does it run out? copy/paste into a txt file the output from "dmesg" command as it starts freezing again
According to the last top update before it locks up there is still free memory (as noted at the bottom of my Original Post), so I don't think it's an issue with memory running out, unless top isn't accurate.
Joined: 03 Jan 2010 Posts: 7568 Location: YWG, Canada
Posted: Fri Jun 26, 2015 17:58 Post subject:
Tomasas wrote:
tatsuya46 wrote:
watch the free ram as it freezes till it freezes, does it run out? copy/paste into a txt file the output from "dmesg" command as it starts freezing again
According to the last top update before it locks up there is still free memory (as noted at the bottom of my Original Post), so I don't think it's an issue with memory running out, unless top isn't accurate.
i saw it but i didnt know how close to the freeze they were observed at
Joined: 22 Jun 2008 Posts: 138 Location: Cleveland, Ohio USA
Posted: Fri Jun 26, 2015 23:41 Post subject:
It could be your max ports get filled. If you disable your torrents and then wait a while does it free up? I used to have that problem on an old WRT54Gv5 running micro.
Once the max ports get full nothing else can connect to the router so you can't even log into the web ui. After some of them time out and free up you can open new ones.
Joined: 03 Jan 2010 Posts: 7568 Location: YWG, Canada
Posted: Fri Jun 26, 2015 23:53 Post subject:
when was dmesg run? just before it froze or during its freeze? or a random guess & it froze later (minutes or hours)? _________________ LATEST FIRMWARE(S)
BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers
This might happen, but if you've set to 16384 max ports, it should suffice.
However, I've seen the freezing on my routers with uTorrent 2.2.x (older, but a lot of people still use it) even with max ports set to 32768.
A single torrent is enough to completely fill the ports in 5-10 minutes and crash the router.
If that's the case, upgrade to a newer torrent client software.
You can check the number of TCP & UDP connections at any given time (before the crash of course) by running commands:
grep -c ^tcp /proc/net/ip_conntrack
or
grep -c ^udp /proc/net/ip_conntrack
They should give you the number of active TCP and UDP connections, respectively. I'd check several times with them, while the router is still functional. With uTorrent 2.2.1 I see continuous increase in the UDP connections until the router freezes (it takes ~10-20 minutes). _________________ THERE ARE NO STRANGERS HERE; ONLY FRIENDS YOU HAVEN'T YET MET.
________________________________________________________________________________________________________
DD-WRT CHANGELOG | DEVICES | DD-WRT BUILDS | KONG BUILDS | UNOFFICIAL BUILDS | DD-WRT in VIRTUALBOX
when was dmesg run? just before it froze or during its freeze? or a random guess & it froze later (minutes or hours)?
It was run every 1 second. I used a while true loop with a sleep of 1 to execute it. The pastebin I posted is the last outputs I could see in my terminal.
As for max ports filling up, I don't think that it reaches it. I'm using transmissionQT(for reference) and it ends up crashing near 2k connections according to the web GUI.
Joined: 22 Jun 2008 Posts: 138 Location: Cleveland, Ohio USA
Posted: Sat Jun 27, 2015 8:32 Post subject:
Oh yes, speaking of torrents, there are configurations you can do to your client to help. Disabling DHT if you can get by without it will help as it uses a lot of UDP connections.
Limiting your connections will also help. Most clients have limits globally, per torrent and attempts per second.
Joined: 03 Jan 2010 Posts: 7568 Location: YWG, Canada
Posted: Sat Jun 27, 2015 9:25 Post subject:
Tomasas wrote:
tatsuya46 wrote:
when was dmesg run? just before it froze or during its freeze? or a random guess & it froze later (minutes or hours)?
It was run every 1 second. I used a while true loop with a sleep of 1 to execute it. The pastebin I posted is the last outputs I could see in my terminal.
As for max ports filling up, I don't think that it reaches it. I'm using transmissionQT(for reference) and it ends up crashing near 2k connections according to the web GUI.
not connections getting filled or itll say nf_conntrack_full repeatadly in dmesg _________________ LATEST FIRMWARE(S)
BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers