# Excessive TCP connections

**URL:** <https://forum.phoscon.de/t/excessive-tcp-connections/6651>\
**Category:** General Support\
**Created:** [November 24, 2025, 8:41pm UTC](https://forum.phoscon.de/t/excessive-tcp-connections/6651 "2025-11-24T20:41:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nosion](https://forum.phoscon.de/user_avatar/forum.phoscon.de/nosion/32/5477_2.png) [@Nosion](https://forum.phoscon.de/u/Nosion)\
**Post date:** [November 24, 2025, 8:41pm UTC](https://forum.phoscon.de/t/excessive-tcp-connections/6651/1 "2025-11-24T20:41:07Z")

</div>

Hi all,

Haven’t been able to find any solution to this issue - hope someone can help.

Using Debian 12  
Since I have updated to Deconz 2.32.1 TCP connections that are opened by deconz continues to rise until the service stops responding with 100% CPU and max open files is reached.

```auto
sudo lsof -p 637 | grep -i ipv4 | wc -l

```

Shows currently 693, this is with 6:39h system uptime, and the number of connections continues to rise.

```auto
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
deCONZ 637 jakob 17u IPv4 209844 0t0 TCP localhost:60864->localhost:8001 (ESTABLISHED)
deCONZ 637 jakob 18u IPv4 212351 0t0 TCP localhost:8001->localhost:60864 (ESTABLISHED)
deCONZ 637 jakob 19u IPv4 562022 0t0 TCP localhost:56350->localhost:8001 (ESTABLISHED)
deCONZ 637 jakob 20u IPv4 562193 0t0 TCP localhost:8001->localhost:56350 (ESTABLISHED)
deCONZ 637 jakob 21u IPv4 614257 0t0 TCP localhost:34040->localhost:8001 (ESTABLISHED)
deCONZ 637 jakob 22u IPv4 617172 0t0 TCP localhost:8001->localhost:34040 (ESTABLISHED)
deCONZ 637 jakob 23u IPv4 680347 0t0 TCP localhost:43038->localhost:8001 (ESTABLISHED)
deCONZ 637 jakob 24u IPv4 614259 0t0 TCP localhost:34054->localhost:8001 (ESTABLISHED)
deCONZ 637 jakob 25u IPv4 617174 0t0 TCP localhost:8001->localhost:34054 (ESTABLISHED)
deCONZ 637 jakob 26u IPv4 683093 0t0 TCP localhost:8001->localhost:43038 (ESTABLISHED)

```

Deconz journalctl log:

```auto
-- Boot 176c8888b4f943979ad35a613179822d --
Nov 24 14:54:47 GIR deCONZ[637]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-jakob'
Nov 24 14:54:47 GIR deCONZ[637]: libpng warning: iCCP: known incorrect sRGB profile
Nov 24 14:54:47 GIR deCONZ[637]: This plugin does not support propagateSizeHints()
Nov 24 14:54:47 GIR deCONZ[637]: This plugin does not support propagateSizeHints()
Nov 24 14:54:47 GIR deCONZ[637]: This plugin does not support propagateSizeHints()
Nov 24 14:54:50 GIR deCONZ[637]: This plugin does not support propagateSizeHints()

```

Any suggestions are welcome 🙂

---

<div class="post-metadata">

**Author:** ![manup](https://forum.phoscon.de/user_avatar/forum.phoscon.de/manup/32/9_2.png) [@manup](https://forum.phoscon.de/u/manup)\
**Post date:** [November 26, 2025, 10:23am UTC](https://forum.phoscon.de/t/excessive-tcp-connections/6651/2 "2025-11-26T10:23:32Z")

</div>

Hi that is strange I’ll have a look. It seems that the close timeout isn’t triggering somehow.

---

<div class="post-metadata">

**Author:** ![Nosion](https://forum.phoscon.de/user_avatar/forum.phoscon.de/nosion/32/5477_2.png) [@Nosion](https://forum.phoscon.de/u/Nosion)\
**Post date:** [November 27, 2025, 7:52pm UTC](https://forum.phoscon.de/t/excessive-tcp-connections/6651/3 "2025-11-27T19:52:45Z")

</div>

After increasing the max open files to 65536, deconz now sometimes crashes(and recover) with this log line right before the crash: ` ***bit out of range 0 - FD_SETSIZE on fd_set*** : terminated`  
Other times it’s hanging - haven’t been at home when this happens, wife restarted server.

I’ll try downgrade deconz and see if this helps.

---

<div class="post-metadata">

**Author:** ![manup](https://forum.phoscon.de/user_avatar/forum.phoscon.de/manup/32/9_2.png) [@manup](https://forum.phoscon.de/u/manup)\
**Post date:** [November 28, 2025, 12:07am UTC](https://forum.phoscon.de/t/excessive-tcp-connections/6651/4 "2025-11-28T00:07:20Z")

</div>

Took a while to figure out where it broke, I’ve reworked the HTTP handler to catch a few blocking errors and ensure connections aren’t staying open forever.

[https://github.com/dresden-elektronik/deconz/commit/a2a8e2c432e0d3e73d1ae007534c378cdcc4a3a9](https://github.com/dresden-elektronik/deconz/commit/a2a8e2c432e0d3e73d1ae007534c378cdcc4a3a9)

---

<div class="post-metadata">

**Author:** ![w.vuyk](https://forum.phoscon.de/user_avatar/forum.phoscon.de/w.vuyk/32/272_2.png) [@w.vuyk](https://forum.phoscon.de/u/w.vuyk)\
**Post date:** [December 4, 2025, 10:30pm UTC](https://forum.phoscon.de/t/excessive-tcp-connections/6651/5 "2025-12-04T22:30:40Z")

</div>

Tested the new beta today and it looks there is a 10 seconds between opening and closing. It looks like this interfering with the events on receiving updates from deconz on changing? Need to dive deeper, but this seems to be happening now
