For big pages the VisualEditor times out. The log contains messages like:
[Mon Nov 15 13:19:04.545572 2021] [fcgid:warn] [pid 363488] (104)Connection reset by peer: [client XXX] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function [Mon Nov 15 13:19:44.692546 2021] [fcgid:warn] [pid 373859] (32)Broken pipe: [client XXX] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
I learned that this results not so much from server but client timeout. Searching the source for the error message I got to mw message 'api-clientside-error-timeout'. This gets triggered after 30seconds. I manually raised that delay to two minutes (https://github.com/wikimedia/mediawiki/blob/ff7a116541249b67260f3c21d8ba2987f73649f0/resources/src/mediawiki.api/index.js#L75). This seems to do the trick for me.
Why is this hardcoded and not configurable?