# Websocket resource limits?

**URL:** <https://community.tempest.earth/t/websocket-resource-limits/986>\
**Category:** Developers\
**Created:** [May 10, 2018, 10:35pm UTC](https://community.tempest.earth/t/websocket-resource-limits/986 "2018-05-10T22:35:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpaauwe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/bpaauwe/32/1056_2.png) [@bpaauwe](https://community.tempest.earth/u/bpaauwe)\
**Post date:** [May 10, 2018, 10:35pm UTC](https://community.tempest.earth/t/websocket-resource-limits/986/1 "2018-05-10T22:35:14Z")

</div>

I’ve been working on my HomeSeer plug-in, adding support for connecting via a websocket and getting data that way. Thus, I’ve been starting and stopping my code frequently. It seems like I may have hit some limit on the number of times I can connect from my IP address. I now get a 404 - resource unavailable when I try to connect.

Trying from a different network with a different IP address works so I’m assuming it is blocking my IP address.

Is this something that will reset at some point tomorrow? 24hrs? Or have I managed to get my IP address flagged as trying to DOS attack the servers?

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [May 10, 2018, 10:43pm UTC](https://community.tempest.earth/t/websocket-resource-limits/986/2 "2018-05-10T22:43:19Z")

</div>

Are you issuing a listen\_stop when you exit your code?

If not you should.

Sockets time out in 60 minutes so you should be good in an hour.

---

<div class="post-metadata">

**Author:** ![bpaauwe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/bpaauwe/32/1056_2.png) [@bpaauwe](https://community.tempest.earth/u/bpaauwe)\
**Post date:** [May 10, 2018, 10:54pm UTC](https://community.tempest.earth/t/websocket-resource-limits/986/3 "2018-05-10T22:54:24Z")

</div>

> [@GaryFunk](#):
>
> Are you issuing a listen\_stop when you exit your code?
> 
> If not you should.
> 
> Sockets time out in 60 minutes so you should be good in an hour.

The code is there to send the listen stop message and go through the proper close sequence, but I’m pretty sure it wasn’t always (maybe not ever) being called on exit. I’ve been focusing on other parts of the code. At this point, I think the sequence is hooked up correctly but I haven’t been able to connect to try it out.

It’s been about 5 hours since I started getting a 404 response so I’m suspecting something else.

---

<div class="post-metadata">

**Author:** ![GaryFunk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/garyfunk/32/5729_2.png) [@GaryFunk](https://community.tempest.earth/u/GaryFunk)\
**Post date:** [May 10, 2018, 11:11pm UTC](https://community.tempest.earth/t/websocket-resource-limits/986/4 "2018-05-10T23:11:20Z")

</div>

Maybe there is some flood-control if X number of sockets are opened and not closed. That’s an issue I never ran into. I was always worried David out Ban me. 🙂

---

<div class="post-metadata">

**Author:** ![bpaauwe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/bpaauwe/32/1056_2.png) [@bpaauwe](https://community.tempest.earth/u/bpaauwe)\
**Post date:** [May 11, 2018, 4:57pm UTC](https://community.tempest.earth/t/websocket-resource-limits/986/5 "2018-05-11T16:57:23Z")

</div>

Well, it’s working now, about 24 hrs. after it stopped working. I tried earlier this morning and it was stilling failing so it looks like maybe my IP address was blocked for about 24 hrs.

Hopefully it was my bad code that triggered this and not just frequent connect/disconnects since my tends to have a lot of incremental change/test cycles.
