CyBear-Jinni / cbj_hub

🕸️ Easy to use open source Hub to control your smart devices from one app.
https://cybearjinni.com
GNU Affero General Public License v3.0
31 stars 21 forks source link

Too many open files error #274

Open guyluz11 opened 1 year ago

guyluz11 commented 1 year ago

After running the hub for several hours on my arm device I got this exception.

Unhandled exception:
SocketException: Failed to create datagram socket (OS Error: Too many open files, errno = 24), address = , port = 5353
#0      _NativeSocket.bindDatagram (dart:io-patch/socket_patch.dart:1015:7)
<asynchronous suspension>
#1      MDnsClient.start (package:multicast_dns/multicast_dns.dart:135:40)
<asynchronous suspension>
#2      MdnsScanner._findingMdnsWithAddress (package:network_tools/src/mdns_scanner/mdns_scanner.dart:72:5)

I think increasing the delay between mdns searches will fix that.

guyluz11 commented 1 year ago

Changing the delay to 2m didn't fix the problem.

guyluz11 commented 1 year ago

Opened issue in flutter repo https://github.com/flutter/flutter/issues/116528