Coder Social home page Coder Social logo

Comments (4)

deraffe avatar deraffe commented on August 22, 2024 3

This happens when CptHook cannot "take the event out of channel", i.e. send to IRC.
Even in normal operation, CptHook may easily become overwhelmed and not immediately process an incoming webhook. This leads to the corresponding socket staying open. If during this time another request is accepted, this opens another socket, which, again, will block and stay open as long as the message is not dispatched to IRC.

See this gist for a simple config and the scripts mentioned below.

CptHook -config cpthook.yml  &
send_test_messages.sh 0.5s

If for whatever reason no messages can be passed to the IRC server at all, this problem is exacerbated and the sockets accumulate until the user limit is hit, as seen in the OP.


One of the reasons why a message would not be passed on to the IRC server (apart from abysmal performance) would be that the connection to the server was never successful. You can easily test this by blackholing all traffic to the respective server and then starting CptHook:

blackhole.sh add irc.host
CptHook -config cpthook.yml &
send_test_messages.sh

Even if you disable the blackhole later, CptHook will not reconnect.

blackhole.sh del irc.host

This condition may occur during early boot if CptHook is started before networking is fully set up.

from cpthook.

fleaz avatar fleaz commented on August 22, 2024

Hey @deraffe
thanks for that super detailed investigation and documentation of the behavior. Because a new release is long overdue, I will use this bug as a motivator for a new release :)

from cpthook.

deraffe avatar deraffe commented on August 22, 2024

Heyho @fleaz – any updates on this?

from cpthook.

kmille avatar kmille commented on August 22, 2024

Yesterday @fleaz and I debugged the issue. Now we know what the irc library can do (and what not). More information about it in #61

from cpthook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.