Skip to content

Diagnosing slow sends #517

@edasaki

Description

@edasaki

Hi! I was wondering if I could get some guidance as to the reason behind slow sends.

            long start = System.currentTimeMillis();
            socket.send(message);
            if (System.currentTimeMillis() - start > 15) {
                log.db("Slow send: " + (System.currentTimeMillis() - start));
            }

With the code above, I'm usually having no problems, but occasionally the sends will take 100+ms (as opposed to usually taking 2-5ms.

What are possible causes of this? Is it more likely to be the messages being too big? Or is it because of the actual server that this code is running on having network latency problems?

And would it be safe to send using the same socket on separate threads?

Thank you for any help!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions