Skip to content

High latency (around 2 minutes) of outbound messages when using the built-in XMPP backend #1757

@yuwash

Description

@yuwash

Describe the bug
I can clearly see a significant latency between the server logs 12:26:20 INFO errbot.core Processing command "tryme" with parameters "" from …@movim.eu/… (the account that errbot is configured for is also on movim.eu) and the message arrives (in this example it was at 12:27:58. I tried it multiple times, always with minutes of delays. To rule out issues with slixmpp, I did a small test within the same virtualenvironment using slixmpp directly and it went through within few seconds. I even conducted another test directly using errbot XMPPBackend and it went through fast as well. The error only occurs when on the full errbot setup. I’m testing with the built-in minimal !tryme command so issues within that plugin can be ruled out as well. When using errbot in text mode, no such delay occurs either. The inbound direction is fine as well as the above-mentioned log appears immediately after I send it.

To Reproduce

  • Install errbot==6.2.0, slixmpp==1.8.6, pyasn1==0.6.3, pyasn1-modules==0.4.2 in a virtual environment with python version 3.11.2. Needed to install the rather old version of slixmpp because errbot uses ClientXMPP.process that doesn’t exist any more since 1.9.0.
  • Create two accounts on movim.eu but I believe it doesn’t matter where you create accounts because the latency only occurs when using it via errbot
  • Set BACKEND="XMPP" in config.py and the BOT_IDENTITY following the docs.

Expected behavior
Message to be delivered within few seconds

Screenshots

Environment (please complete the following information):

  • Errbot version: 6.2.0
  • OS version: Debian GNU/Linux 12 (bookworm)
  • Python version: 3.11.2
  • Using a virtual environment: yes
  • Using Docker: no; notably in the Chromebook Linux development environment though

Additional context
Attached the two test scripts I used and got the message delivered within seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions