cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

Synced attribute has not been available.... #224

Closed bazz1tv closed 7 years ago

bazz1tv commented 8 years ago

I get this while on ESPERNet IRC network -- when my bot tries to see if an authorized user initiated a command.

[2016/04/30 01:32:12.843] !! A synced attribute ('authname' for #<User nick="bazz">) has not been available for 10 seconds, still waiting
[2016/04/30 01:32:12.843] !!   /home/bazz/.gem/ruby/gems/cinch-2.3.1/lib/cinch/syncable.rb:67:in `attr'
[2016/04/30 01:32:12.844] !!   /home/bazz/.gem/ruby/gems/cinch-2.3.1/lib/cinch/user.rb:239:in `attr'
[2016/04/30 01:32:12.844] !!   /home/bazz/.gem/ruby/gems/cinch-2.3.1/lib/cinch/user.rb:59:in `authname'
[2016/04/30 01:32:12.844] !!   /home/bazz/Code/ayumi/lib/ayumi/bot.rb:67:in `admin?'

the last function which primarily calls user.refresh and user.authname (Cinch::Bot)

This does not always happen, and It always "syncs" eventually.. (< 20s IIRC)

Is there any known reason for this? Is it possible to eradicate the long delay time?

I found a closed issue (#151) that also experienced this but it was not IRC and so was not supported.

dominikh commented 8 years ago

I need to see more of the log. I need to see Cinch send a WHOIS, and I need to see the server's response.

Since you say that it "syncs eventually", I assume that the IRC server is heavily limiting the rate with which you can send WHOIS queries, in which case everything is working as expected.

bazz1tv commented 8 years ago

based purely on my regular usage of this function (without problems), everything appears to be working as expected. although, I am now running with a custom configuration:

    server_queue_size: 40
    messages_per_second: 10.0

If I run into the problem again I will capture a bigger log 🍭