GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — websocket timeouts, ping/pong · Issue #1202 · ArcadeData/arcadedb

websocket timeouts, ping/pong #1202

New issue
Copy link
New issue
Copy link
Closed
Closed
websocket timeouts, ping/pong#1202
Copy link
Assignees
lvca
Labels
invalidThis doesn't seem right
Milestone
23.9.1

Description

@tolgaulas
tolgaulas
opened on Aug 11, 2023
Issue body actions

ArcadeDB Version:

23.6.1

OS and JDK Version:

Debian 11, jdk-17

Expected behavior

websocket connections should not expire until closed or websockets should respond pings with pongs to keep the connection open.

Actual behavior

I could not test it thoroughly but what I observed from various tools (i.e wsocat,nodejs), the subscription works but after sometime the announcements stop. In nodejs what we see the server closes connection.

After I peeked at arcadedb source code in server/src/main/java/com/arcadedb/server/http/ws (and its parent http stack), though iI am not very literate with java, I felt that the [websocket ping/pong] (https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#pings_and_pongs_the_heartbeat_of_websockets) and as the connection is based on standard http connection, it is probably timing out when there is no activity.

Steps to reproduce

`connect with ws for subscribe, insert into watched db, observe the announcement, wait for long time (10m?), and insert one more time, observe nothing published on websocket (wsocat reconnect the socket i presume, nodejs doesnot hence gives disconnected notification even before that.

<An SQL script to reproduce the problem or a JUnit test case will increase **A LOT** the chance to have a quick fix>

Can you pls shed some light on this? I know REST/JSON has some session-id passing feature (which expires on transcations).

if we periodically subscribe by sending commands, this connection remains open, but this sounds unwise as it may kill resources in the server, am I wrong?

Activity

  1. tolgaulas commented on Aug 17, 2023

    @tolgaulas
    tolgaulas
    on Aug 17, 2023
    Author
    More actions

    I dug a little and i saw that the webserver extends a portion of the undertow's websocket default implementation which by default respond to pongs. And i confirm this by using this and sow that it responds the pong messages

    ./websocat "ws://user:pass@arcadedb:2480/ws" --ping-interval 1 --ping-timeout 2 --print-ping-rtts -E
    RTT 0.082423 s
    RTT 0.068529 s
    RTT 0.069332 s
    RTT 0.067708 s
    RTT 0.069457 s
    RTT 0.069364 s
    RTT 0.075618 s
    RTT 0.067169 s
    

    Also, node-red's stock websocket had some issues in reporting/displaying the connection as disconnected while it actually was not.

    So ws works fine on ping/pongs.

    Reacted by Luca Garulli
  2. tolgaulas
    closed this as completedon Aug 17, 2023
  3. lvca commented on Aug 17, 2023

    @lvca
    lvca
    on Aug 17, 2023
    Member
    More actions

    @tolgaulas do you know why it disconnects after a while?

  4. lvca
    self-assigned this
    on Aug 17, 2023
  5. lvca
    added
    invalidThis doesn't seem right
    on Aug 17, 2023
  6. lvca
    added this to the 23.9.1 milestone on Aug 17, 2023
  7. tolgaulas commented on Aug 17, 2023

    @tolgaulas
    tolgaulas
    on Aug 17, 2023
    Author
    More actions

    @tolgaulas do you know why it disconnects after a while?

    Actually it does not, we were testing it with node-red, it was node-red's mistake as displaying such. So it was a false-error. Despite its been claimed its fixed here, we're having similar problems with it.

    we will dig into it more with node-red

    Reacted by Luca Garulli
  8. lvca commented on Aug 17, 2023

    @lvca
    lvca
    on Aug 17, 2023
    Member
    More actions

    Ok, thanks.

  9. tolgaulas commented on Aug 18, 2023

    @tolgaulas
    tolgaulas
    on Aug 18, 2023
    Author
    More actions

    @lvca also made an extensive test on ws timeouts, I can confirm that ws connections are kept alive for 6min, 60min, 600mins, 6000mins idle intervals and acted as behaved (responded to the open channel with actions_) at the end of the pauses all the time. Also peeped the source, i could not see any kind of session management in websocket related activities but only in transactional stuff at the moment, . So my initial report was false (may be due to unhealthy network environment ); ws is healthy, rock solid and per standards.

    Reacted by Luca Garulli
  10. lvca commented on Aug 18, 2023

    @lvca
    lvca
    on Aug 18, 2023
    Member
    More actions

    Great, thanks @tolgaulas for digging into this.

  11. mergify
    added a commit that references this issue on Sep 8, 2025

    chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.18.0…

    686f577
  12. tae898
    added a commit that references this issue on Jun 28, 2026

    chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.18.0…

    686edd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

    Milestone

    • 23.9.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.