Closed eandersson closed 2 months ago
Ah, good catch. Do you know if we can set a connection limit?
The issue seems to be with any type of broken connection and not necessarily just having a bunch of connections. This is a simple code snippet to quickly trigger the crash. It requires the python websockets
library.
from websockets.sync import client
import multiprocessing
import time
MY_IP = '192.168.0.100'
def main():
while True:
with client.connect(f"ws://{MY_IP}/api/ws") as websocket:
while True:
websocket.recv(timeout=60)
if __name__ == '__main__':
processes = []
for _ in range(5):
process = multiprocessing.Process(target=main)
process.start()
processes.append(process)
time.sleep(1)
for process in processes:
process.kill()
Hello was able to reproduce a crash as discussed with skot 1368, 525, 1166, 2.1.10
open on iPhone 15 pro latest firmware logs, hit show logs and put iPhone on standby innert 5 mins webgui of Bitaxe is not reachable on LAN anymore
network ping - device is responding webgui not responding display on device says see pics device is not recovering and on display showing evthg alright though ckpool says otherwise
log on ckpool (happened yesterday same at 9am (at 10 p.m i changed some settings) and today at about 8 a.m.
If you open too many connections to get logs you'll eventually crash the device and it won't recover on its own. It's pretty easy to reproduce by just having something like a python script open a few ws connections in rapid succession. This seems to be a pretty known issue with ESP32, but wasn't able to find a solution for ws. I tried adding
Connection: close
to the header and set things likelru_purge_enable
without success.