Files
gristlabs_grist-core/app/client/components
Dmitry S 526a5df157 (core) Manage memory used for websocket responses to reduce the risk of server crashes.
Summary:
- Implements MemoryPool for waiting on memory reservations.
- Uses MemoryPool to control memory used for stringifying JSON responses in Client.ts
- Limits total size of _missedMessages that may be queued for a particular client.
- Upgrades ws library, which may reduce memory usage, and allows pausing the websocket for testing.
  - The upgrade changed subtle behavior corners, requiring various fixes to code and tests.

- dos.ts:
  - Includes Paul's fixes and updates to the dos.ts script for manual stress-testing.
  - Logging tweaks, to avoid excessive dumps on uncaughtError, and include timestamps.

Test Plan:
- Includes a test that measures heap size, and fails without memory management.
- Includes a unittest for MemoryPool
- Some cleanup and additions to TestServer helper; in particular adds makeUserApi() helper used in multiple tests.
- Some fixes related to ws upgrade.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3974
2023-08-07 11:28:31 -04:00
..
2020-10-02 13:24:21 -04:00
2021-05-25 21:14:49 +02:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2023-04-12 01:58:48 -04:00
2023-06-02 17:59:22 +02:00
2020-10-02 13:24:21 -04:00
2023-06-02 17:59:22 +02:00
2022-07-04 10:42:40 -04:00
2023-04-20 12:20:03 -04:00
2020-10-02 13:24:21 -04:00
2020-10-02 13:24:21 -04:00
2023-08-04 14:59:55 +02:00
2023-08-04 14:59:55 +02:00
2023-01-19 09:46:59 +01:00
2023-03-02 11:22:49 +01:00
2020-10-02 13:24:21 -04:00
2023-03-27 14:12:52 -04:00
2023-08-04 14:59:55 +02:00
2023-08-04 14:59:55 +02:00
2023-04-12 01:58:48 -04:00
2023-03-02 11:22:49 +01:00
2020-10-02 13:24:21 -04:00
2023-03-02 11:22:49 +01:00
2020-10-02 13:24:21 -04:00