• long pauses when clicking around sync webv4

    From xbit ops@1:103/705 to GitLab issue in main/sbbs on Sat Apr 18 04:06:56 2026
    open https://gitlab.synchro.net/main/sbbs/-/issues/1129

    A few sysops have been discussing this on IRC, and the issue appears to be reproducible. I’ve also tested it on both Linux and Windows with the same results. In short, while navigating around WebV4, there are intermittent long pauses that occur at times.

    Example attached.![vsdc-sr_2026-04-18_04-01-51](https://gitlab.synchro.net/-/project/13/uploads/946c97cc6b8faf9aa8582a6995444e3e/vsdc-sr_2026-04-18_04-01-51.mp4){width=681 height=600}
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sun Apr 19 02:18:45 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8826

    The web server log output at the time of those pauses would help determine the likely cause. e.g. if the web server has maxed out its client connections and is rejecting some of the (new) connections from the client, that could cause observable delays.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From xbit ops@1:103/705 to GitLab note in main/sbbs on Sun Apr 19 07:02:33 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8828

    Currently set at 100 max clients and max con-conn set at 10. I'll enable received requests and transmitted responses for the log review.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From xbit ops@1:103/705 to GitLab note in main/sbbs on Sun Apr 19 07:20:33 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8829

    updated max clients 500 max con-conn 50. enabled received requests and transmitted responses. was able to generate the long pause quickly with just a few clicks around the forum. attached web.log.

    [web.log2026-04-19.log](/uploads/fd12482c62c02174f708d132b2c34d13/web.log2026-04-19.log)
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sun Apr 19 11:35:30 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8830

    What you attached is a web access log and not (generally) helpful for debugging. The actual web server log output that would be useful looks more like this:
    ```
    4/19 09:43:40a 0952 HTTPS [34.205.45.217] Connection accepted on 71.95.196.34 port 443 from port 48492
    4/19 09:43:40a 2864 HTTPS [34.196.237.236] Request 1: GET /files/Pier.Shareware/piergrfx/?view=%22GIFBLSTB.ZIP%22 HTTP/1.1
    4/19 09:43:40a 2864 HTTPS [34.196.237.236] User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot) Chrome/119.0.6045.214 Safari/537.36
    4/19 09:43:41a 0952 HTTPS [34.205.45.217] Request 1: GET /?page=002-files.xjs HTTP/1.1
    4/19 09:43:41a 0952 HTTPS [34.205.45.217] User-Agent: Crawler test
    4/19 09:43:41a 2864 HTTPS [34.196.237.236] Sending file: c:\sbbstemp\SBBS_SSJS.301028.2864.html (3808 bytes)
    4/19 09:43:41a 2864 HTTPS [34.196.237.236] Sent file: c:\sbbstemp\SBBS_SSJS.301028.2864.html (3808 bytes)
    4/19 09:43:41a 1920 HTTPS [34.205.45.217] Session thread terminated after 1 requests (5 clients and 13 threads remain, 6821 served, 29 concurrently)
    4/19 09:43:42a 2864 HTTPS [34.196.237.236] Session thread terminated after 1 requests (4 clients and 11 threads remain, 6822 served, 29 concurrently)
    4/19 09:43:45a 1896 HTTPS [74.7.241.38] Connection accepted on 71.95.196.34 port 443 from port 33918
    4/19 09:43:45a 1896 HTTPS [74.7.241.38] Request 1: GET /?page=001-forum.ssjs&sub=syncprog&thread=54367 HTTP/1.1
    4/19 09:43:45a 1896 HTTPS [74.7.241.38] User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)
    ```
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From xbit ops@1:103/705 to GitLab note in main/sbbs on Sun Apr 19 16:34:35 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8833

    Attached. Note, it only takes a few clicks to reproduce. Jumping from one post to another for example.

    [updated-log.txt](/uploads/0248757d193eeca752c3bb1886cdff14/updated-log.txt) --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From xbit ops@1:103/705 to GitLab note in main/sbbs on Sun Apr 26 16:39:10 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8871

    just did a test on the sync linux side with the same results. note, i don't have the webserver open to the internet so this was a lan test on port 80.

    Apr 26 16:35:31 unix-bit synchronet[2937244]: web 0065 HTTP [192.168.1.12] User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
    Apr 26 16:35:31 unix-bit synchronet[2937244]: web 0065 HTTP [192.168.1.12] Request 3: GET /api/events.ssjs?subscribe=nodelist&subscribe=mail&subscribe=telegram HTTP/1.1
    Apr 26 16:35:31 unix-bit synchronet[2937244]: web 0065 HTTP [192.168.1.12] User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
    Apr 26 16:35:32 unix-bit synchronet[2937244]: web 0046 HTTP [192.168.1.12] Session thread terminated after 5 requests (6 clients and 14 threads remain, 2 served, 7 concurrently)
    Apr 26 16:35:34 unix-bit synchronet[2937244]: web 0050 HTTP [192.168.1.12] Session thread terminated after 4 requests (5 clients and 12 threads remain, 3 served, 7 concurrently)
    Apr 26 16:35:34 unix-bit synchronet[2937244]: web 0052 HTTP [192.168.1.12] Session thread terminated after 5 requests (4 clients and 10 threads remain, 4 served, 7 concurrently)
    Apr 26 16:35:35 unix-bit synchronet[2937244]: web 0051 HTTP [192.168.1.12] Session thread terminated after 6 requests (3 clients and 8 threads remain, 5 served, 7 concurrently)
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sun Apr 26 17:20:03 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_8872

    That log output isn't useful. The full log session should start from the connection/request lines. Enabling debug-level logging would be even more helpful. Also, when pasting logs here, enclose in a code block:
    ```
    like this
    ```
    that said, it sounds like something that's likely going to need more instrumentation (trace-like log messages) and reproduction by someone to debug. So I wouldn't bother worrying about capturing and attaching more log snippets to this issue right now.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From xbit ops@1:103/705 to GitLab issue in main/sbbs on Fri Jun 5 07:38:18 2026
    close https://gitlab.synchro.net/main/sbbs/-/issues/1129
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Fri Jun 5 10:17:16 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_9258

    The problem went away?
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Fri Jun 5 12:47:41 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_9262

    There have been a few recent updates to the Synchronet web server, but not webv4 (echicken's dynamic web UI), that I recall.

    So no changes made directly pertaining to this issue, yet.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From xbit ops@1:103/705 to GitLab note in main/sbbs on Thu Jun 25 22:13:28 2026
    https://gitlab.synchro.net/main/sbbs/-/issues/1129#note_9470

    Working with my Claude on this. This issue seems fixed on myside:

    # Issue #1129 — Long Pauses When Clicking Around Sync WebV4

    ## Summary

    Two bugs identified and patched. Both are required for a complete fix. Tested on X-Bit BBS (Synchronet v3.22a, Windows 10) with 200+ message areas across FidoNet, DoveNET, fsxNet, tqwNet, and Zer0net.

    ---

    ## Bug 1 — `listSubs()` opens MsgBase for every sub unnecessarily (server-side)

    **File:** `webv4/lib/forum.js`

    ### Root Cause

    `listSubs()` is called at page render time every time a user clicks a group (e.g. FidoNet) to view its list of sub-boards. It opens a `MsgBase` instance for **every sub in the group**, even though the two fields that actually require an open MsgBase (`unread` and `newest`) are both **commented out**:

    ```javascript
    // unread: is_user() ? getSubUnreadCount(mb) : null,
    // newest: getNewestMessageInSub(mb),
    ```

    On a system with 141 FidoNet echos, this means 141 `MsgBase.open()` + `MsgBase.close()` calls on every single click of the FidoNet group link — purely wasted I/O with no effect on the rendered output. This was enough to cause the page render thread to stall for several seconds, which manifests as the browser spinner when navigating back and forth rapidly.

    ### Fix

    Remove the MsgBase open/close entirely from `listSubs()` since neither field requiring it is currently active:

    **Before:**
    ```javascript
    function listSubs(group) {
    return msg_area.grp_list[group].sub_list.map(function (e) {
    const mb = new MsgBase(e.code);
    if (!mb.open()) throw new Error(mb.error);
    const ret = {
    index: e.index,
    code: e.code,
    grp_index: e.grp_index,
    grp_name: e.grp_name,
    name: e.name,
    description: e.description,
    can_post: e.can_post,
    is_operator: e.is_operator,
    is_moderated: e.is_moderated,
    scan_ptr: e.scan_ptr,
    scan_cfg: e.scan_cfg,
    // unread: is_user() ? getSubUnreadCount(mb) : null,
    // newest: getNewestMessageInSub(mb),
    };
    mb.close();
    return ret;
    });
    }
    ```

    **After:**
    ```javascript
    function listSubs(group) {
    return msg_area.grp_list[group].sub_list.map(function (e) {
    return {
    index: e.index,
    code: e.code,
    grp_index: e.grp_index,
    grp_name: e.grp_name,
    name: e.name,
    description: e.description,
    can_post: e.can_post,
    is_operator: e.is_operator,
    is_moderated: e.is_moderated,
    scan_ptr: e.scan_ptr,
    scan_cfg: e.scan_cfg,
    // unread: is_user() ? getSubUnreadCount(mb) : null,
    // newest: getNewestMessageInSub(mb),
    };
    });
    }
    ```

    ### Impact

    Page render time for the FidoNet sub list dropped from several seconds to under 150ms in testing. No functional change — the rendered output is identical.

    ---

    ## Bug 2 — AJAX requests not cancelled on navigation, SSE not closed on unload (client-side)

    **File:** `webv4/root/js/common.js`

    ### Root Cause

    Two related issues in the client-side fetch layer:

    **a) No AbortController on `v4_fetch()`**

    All AJAX calls via `v4_get()` and `v4_post()` use `fetch()` with no `AbortController`. When the user navigates away mid-request, the browser abandons its interest in the response but the **server-side Synchronet JS thread keeps running** until the full operation completes. On systems with many subs, `getGroupUnreadCounts()` and `getSubUnreadCounts()` can take several seconds, meaning orphaned server threads accumulate with rapid navigation.

    **b) EventSource not closed on navigation**

    The SSE connection to `events.ssjs` is created on every page load but never explicitly closed before navigation. While the browser eventually closes the TCP connection, the server-side `events.ssjs` loop (`while (client.socket.is_connected)`) continues running through its `mswait(1000)` cycle until the disconnect is detected, holding a server thread open longer than necessary.

    ### Fix

    **Before:**
    ```javascript
    var updateInterval = 60000;
    const _sbbs_events = {};

    async function v4_fetch(url, method, body) {
    const init = { method, headers: {} };
    ...
    try {
    const response = await fetch(url, init);
    const data = await response.json();
    return data;
    } catch (err) {
    console.error('Error on fetch', url, init);
    }
    }
    ```

    And at the bottom of `window.onload`:
    ```javascript
    const es = new EventSource(`./api/events.ssjs${qs}`); Object.keys(_sbbs_events).forEach(e => es.addEventListener(e, _sbbs_events[e].callback));
    ```

    **After:**
    ```javascript
    var updateInterval = 60000;
    const _sbbs_events = {};
    let _v4_abort_controller = null;

    async function v4_fetch(url, method, body) {
    if (_v4_abort_controller) _v4_abort_controller.abort();
    _v4_abort_controller = new AbortController();
    const init = { method, headers: {}, signal: _v4_abort_controller.signal };
    ...
    try {
    const response = await fetch(url, init);
    const data = await response.json();
    return data;
    } catch (err) {
    if (err.name === 'AbortError') return;
    console.error('Error on fetch', url, init);
    }
    }
    ```

    And at the bottom of `window.onload`:
    ```javascript
    const es = new EventSource(`./api/events.ssjs${qs}`); Object.keys(_sbbs_events).forEach(e => es.addEventListener(e, _sbbs_events[e].callback));
    window.addEventListener('beforeunload', () => es.close());
    ```

    ### Impact

    In-flight AJAX requests are now cancelled when a new request is made, preventing orphaned server threads from accumulating. The SSE connection is cleanly closed before navigation, allowing the server-side event loop to exit promptly.

    ---

    ## Test Results

    Tested on X-Bit BBS (x-bit.org), Synchronet v3.22a, Windows 10, with 200+ sub-boards across multiple FidoNet and other networks.

    - **Before:** Rapid Forum → FidoNet → Forum → FidoNet navigation caused the browser to spin indefinitely. Network tab showed requests accumulating as `(pending)` with no resolution.
    - **After (Bug 1 fix only):** Page renders in ~146ms. No pending requests. No spinner.
    - **After (Bug 2 fix only):** Network tab shows cancelled requests instead of pending ones piling up, confirming orphaned fetches are being cleaned up.
    - **Both fixes together:** Clean navigation with no stalls observed across extended testing.

    ---

    ## Notes

    - Bug 1 is the primary fix. The MsgBase overhead scales with the number of subs in a group, so systems with large FidoNet or other network echo lists are most affected.
    - Bug 2 is a correctness improvement that prevents resource accumulation and should be applied regardless.
    - If/when `unread` and `newest` are re-enabled in `listSubs()`, the MsgBase open will need to be restored — but at that point the unread counts should come via the SSE event system rather than blocking the page render.
    - Note: a 16-second SSE stall observed during testing on a local test BBS was traced to `localhost` IPv4/IPv6 resolution fallback and is **not** a webv4 bug.
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)