0

So, I have the Raspberry Pi 4B with a Plex server set up and another Express server I'm running for a local website. The problem is that after a certain while (a few hours or so) I can no longer connect to the website; I get the error:
192.168.0.61 took too long to respond
I can sometimes connect to it through my phone after waiting for a bit.

The Plex server also stops working so I can't stream any videos from it.
When I try to SSH into the Pi, it says:
connect to host 192.168.0.61 port 22: Connection timed out.

All of these work perfectly fine for a few hours after startup, but then something happens with the Pi (no idea) and they suddenly stop working. The IP is static so that isn't the issue. I've checked the router and the Pi is connected when these errors occur. If I reboot the Pi then everything works fine, but then I just encounter the same issue after a few hours.

I have no clue at all what could be causing this. Any help would be appreciated, thanks.

Edit:

Firmware Version (from /opt/vc/bin/vcgencmd version): 194a85abd768c7334bbadc3f1911c10a7d18ed14

Starry Sky
  • 11
  • 4
  • 2
    "`The IP is static so that isn't the issue.`" [Famous last words](https://idioms.thefreedictionary.com/famous+last+words) :) – Seamus Jan 26 '21 at 23:26
  • @Seamus could you please elaborate? – Starry Sky Jan 27 '21 at 17:45
  • Apologies - all I meant to say was that static IPs **always** seem to be the issue here - they create many questions. There's nothing wrong w/ static IPs per se, but ithat they are configured improperly, and **rarely** necessary. – Seamus Jan 27 '21 at 19:59
  • Well, using static IPs has never caused me a problem before, and I can ensure that it's configured fine on the Pi. Unless you're suggesting I use a DHCP reservation instead/together? Regardless, let's not divert from this question's topic. – Starry Sky Jan 27 '21 at 22:17
  • Your choice... I was reacting to this statement in your question: `"I have no clue at all what could be causing this."` And as it seems you've resolved your issue, let's just leave it at that? – Seamus Jan 27 '21 at 22:30

1 Answers1

1

After inspecting the logs from journalctl, I noticed a line:

raspberrypi kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled

I was of the assumption that power management was disabled by default on this model of the Pi, but for whatever reason, it wasn't.

The thread here solved my problem.

Starry Sky
  • 11
  • 4
  • That's interesting, but the [thread you referenced](https://forum.clockworkpi.com/t/how-to-disable-wifi-power-save-to-prevent-disconnects/933) ***seems*** to be [tied to another hardware platform](https://github.com/fordsfords/wlan_pwr) - possibly an older version of the OS(?). Also, wifi power management is [not mentioned in the "official documentation" for wifi config.](https://www.raspberrypi.org/documentation/configuration/wireless/). Could you edit your post to include the firmware rev you're running? – Seamus Jan 27 '21 at 00:17
  • Following on to my request for you to id your firmware version, there is [another Q&A here](https://raspberrypi.stackexchange.com/questions/43473/does-the-bcm43438-wifi-chip-in-raspberry-pi-3-support-power-management-setting) that might provide some insight. In particular, [this answer](https://raspberrypi.stackexchange.com/a/101937/83790) indicates that this could be handled in `systemd` rather than thrashing the configuration files. To be clear: I don't know ***what*** the correct answer is, but I'd be surprised if this is it. – Seamus Jan 27 '21 at 01:40
  • @Seamus A little too many links all over the answer and comments to understand it. – Ingo Jan 27 '21 at 10:28
  • @Ingo: I don't see how to clarify it, but I was not aware that "WiFi Power Management" was an issue in `buster`. – Seamus Jan 27 '21 at 20:05
  • @Seamus It was an issue on the older Raspberry Pis until about 2015. The solution was to disable Power Management. But it has been fixed since then and Power Management was enabled again in the last year without any known issues. But you know, old stories die hard. – Ingo Jan 27 '21 at 21:10
  • @Ingo: That's what I *thought*, but I couldn't find a reference to support it. And that being the present situation, it seems to me the OP's "answer" here serves only to confuse the issue - maybe even create new ones. – Seamus Jan 27 '21 at 21:22
  • @Seamus I didn't even notice that the thread was in reference to the [ClockworkPi OS](https://www.clockworkpi.com/) - thanks for pointing that out. I've also added my firmware version to the original post. When you say "thrashing the config files", [the solution I posted](https://forum.clockworkpi.com/t/how-to-disable-wifi-power-save-to-prevent-disconnects/933) sets the power save mode off whenever a network interface is brought up. Is this something you wouldn't recommend? – Starry Sky Jan 27 '21 at 22:31
  • @StarrySky: I wouldn't - but if it makes your system work, and you're OK with it, I'd say leave well enough alone for now. – Seamus Jan 27 '21 at 22:34