I have a paragraph "Table" with a entity ref field of paragraph "table row" which in turn has a entity ref field "table cell".
This table paragraph might itself be placed in an entity ref field on an "accordion card" paragraph, which is a child of the "accordion" paragraph, which might be in the entity ref field of the "page" node.
So there are many levels of nesting in this configuration
What seems to happen is that while editing table content, the memory usage of layout_paragraphs grows progressively on each save of table cells and rows, response time for saving grows, and before long, this ajax error occurs, and the paragraphs can no longer be temporarily saved:
An AJAX HTTP error occurred.
Path: /layout-paragraphs-builder/9fe2dccd7787089c0871449940c2a28f/edit/e2b609cd-5d30-4d13-b03b-4eb1d5abc690?_wrapper_format=drupal_dialog&ajax_form=1
StatusText: parsererror
ResponseText: Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 76634088 bytes) in /app/docroot/core/lib/Drupal/Core/Database/Statement/PdoTrait.php on line 115
That's 1G of memory used. Error occurred at 512Mb, increasing to 1G didn't appreciably help.
The page in question is quite large in terms of paragraph content, but the issue mainly seems to be apparent when making extensive temporary changes while deeply nested in the paragraphs structure.
Error reproduced on Acquia dev host, and local Lando.