gristlabs_grist-core/app/client/components
Paul Fitzpatrick cf23a2d1ee (core) add GVISOR_LIMIT_MEMORY to cap memory available in sandbox
Summary:
This allows limiting the memory available to documents in the sandbox when gvisor is used. If memory limit is exceeded, we offer to open doc in recovery mode. Recovery mode is tweaked to open docs with tables in "ondemand" mode, which will generally take less memory and allow for deleting rows.

The limit is on the size of the virtual address space available to the sandbox (`RLIMIT_AS`), which in practice appears to function as one would want, and is the only practical option. There is a documented `RLIMIT_RSS` limit to `specifies the limit (in bytes) of the process's resident set (the number of virtual pages resident in RAM)` but this is no longer enforced by the kernel (neither the host nor gvisor).

When the sandbox runs out of memory, there are many ways it can fail. This diff catches all the ones I saw, but there could be more.

Test Plan: added tests

Reviewers: alexmojaki

Reviewed By: alexmojaki

Subscribers: alexmojaki

Differential Revision: https://phab.getgrist.com/D3398
2022-05-18 14:26:27 -04:00
..
AceEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
AceEditor.js (core) Fixing scrollbars on ace editor for windows users. 2021-10-25 10:56:43 +02:00
AceEditorCompletions.ts (core) One more phase of ACL UI revision. 2020-12-22 22:18:12 -05:00
ActionLog.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ActionLog.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Base.js (core) move client code to core 2020-10-02 13:24:21 -04:00
BaseView2.ts (core) Copy column type and options when pasting into an empty column 2022-04-04 14:53:16 +02:00
BaseView.js (core) Raw renames 2022-04-27 22:21:55 +02:00
CellPosition.ts (core) Draft cells 2021-05-25 21:14:49 +02:00
ChartView.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ChartView.ts (core) Auto-check aggregate values option as soon as table is a summary 2022-05-18 10:10:28 +02:00
ClientScope.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.js (core) Trim trailing whitespace when pasting plain text 2021-11-04 01:26:47 +02:00
CodeEditorPanel.css (core) apply access control to code view 2021-05-27 17:52:23 -04:00
CodeEditorPanel.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
ColumnFilters.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
ColumnTransform.ts (core) Adding font options to the style picker 2022-04-07 20:35:03 +02:00
Comm.ts (core) add GVISOR_LIMIT_MEMORY to cap memory available in sandbox 2022-05-18 14:26:27 -04:00
commandList.js (core) Changing shortcut for Duplicate row command 2022-04-27 22:02:27 +02:00
commands.css (core) move client code to core 2020-10-02 13:24:21 -04:00
commands.js (core) Improve focus and keyboard shortcuts in modals. 2020-10-03 22:56:00 -04:00
CopySelection.ts (core) Copy column type and options when pasting into an empty column 2022-04-04 14:53:16 +02:00
Cursor.ts (core) Support 'new' row in anchor links. 2021-09-24 09:01:10 -04:00
CursorMonitor.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
CustomView.css (core) Fix CustomView css to take full height of widget on all browsers including Safari 2020-10-06 13:18:50 -04:00
CustomView.ts (core) Adding onNewRecord event for custom widgets 2022-04-12 16:51:16 +02:00
DataTables.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
DetailView.css (core) Raw renames 2022-04-27 22:21:55 +02:00
DetailView.js (core) Adding new command Duplicate rows 2022-04-20 17:29:48 +02:00
DocComm.ts (core) Add API endpoint to get site usage summary 2022-05-16 11:16:19 -07:00
DocConfigTab.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DocumentUsage.ts (core) Add API endpoint to get site usage summary 2022-05-16 11:16:19 -07:00
DocUsageBanner.ts (core) Add API endpoint to get site usage summary 2022-05-16 11:16:19 -07:00
Drafts.ts Correct spelling mistakes 2022-02-19 09:46:49 +00:00
duplicatePage.ts (core) Updating RawData views 2022-05-04 21:41:42 +02:00
EditorMonitor.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
EmbedForm.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FormulaTransform.ts (core) Automatically finalize action bundles when unrelated actions/bundles come in. 2020-11-10 10:32:07 -05:00
GridView.css (core) Selection for styled columns 2022-05-13 09:45:17 +02:00
GridView.js (core) Selection for styled columns 2022-05-13 09:45:17 +02:00
GristDoc.css (core) move client code to core 2020-10-02 13:24:21 -04:00
GristDoc.ts (core) Add API endpoint to get site usage summary 2022-05-16 11:16:19 -07:00
GristWSConnection.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Importer.ts (core) Fix import bug when skipping non-text columns 2022-04-28 12:46:44 -07:00
Layout.css (core) Collapse inactive view sections on mobile screens. 2021-02-09 09:17:32 -05:00
Layout.js (core) Fixing bug with undoing page delation with a custom layout 2021-12-20 19:32:14 +01:00
LayoutEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutPreview.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutPreview.js (core) move client code to core 2020-10-02 13:24:21 -04:00
LinkingState.ts (core) Allow linking summary tables based on ref/reflist columns (except group) 2022-05-12 15:59:12 +02:00
Login.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ParseOptions.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
PluginScreen.ts (core) Show proper message on empty Excel import, rather than a code error 2022-04-27 00:49:28 -04:00
Preferences.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Printing.css (core) Improve printing of tables, fix printing of charts, add a browser test. 2020-10-12 16:04:18 -04:00
Printing.ts (core) New UI for raw data views 2022-03-12 13:51:48 +01:00
RawData.ts (core) Raw renames 2022-04-27 22:21:55 +02:00
RecordLayout.css (core) move client code to core 2020-10-02 13:24:21 -04:00
RecordLayout.js Correct spelling mistakes 2022-02-19 09:46:49 +00:00
RecordLayoutEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
RefSelect.js (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
SearchBar.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Selector.js (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
TypeConversion.ts (core) Adding font options to the style picker 2022-04-07 20:35:03 +02:00
TypeTransform.ts (core) Adding font options to the style picker 2022-04-07 20:35:03 +02:00
UndoStack.ts (core) Change UndoStack._linkMap to store an array of action groups for each linkId 2022-01-20 19:00:01 +02:00
UnsavedChanges.ts (core) support ?embed=true and &style=light for a clean embed experience 2020-08-14 13:34:38 -04:00
ValidationPanel.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ValidationPanel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
viewCommon.css (core) Selection for styled columns 2022-05-13 09:45:17 +02:00
viewCommon.js (core) Skip saving column resizes in read-only mode 2021-12-07 14:37:25 -08:00
ViewConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewConfigTab.js (core) Initial data tables page 2022-02-10 12:46:19 +02:00
ViewLayout.css (core) Raw renames 2022-04-27 22:21:55 +02:00
ViewLayout.ts (core) Auto-check aggregate values option as soon as table is a summary 2022-05-18 10:10:28 +02:00
ViewLinker.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewPane.ts (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
WidgetFrame.ts (core) Adding onNewRecord event for custom widgets 2022-04-12 16:51:16 +02:00