@Lofhi reported a comment getting posted twice on a long (~250K) talk page at https://fr.wikipedia.org/wiki/Sujet:Vjn5as08a5f8c6fd There were errors about 'the server did not respond within the expected time', but the comment actually had posted (and two tries = accidental double posting).
By default, all API requests come with a 30 second timer – the operations are usually supposed to take a few seconds at most, and if they take longer, that usually indicates a network issue that will prevent the response from ever arriving, so we stop waiting and display an error. (This is called a client-side timeout.)
For the page in question (https://fr.wikipedia.org/wiki/Discussion:Pandémie_de_maladie_à_coronavirus_de_2020_en_France), it takes nearly 10 seconds to just parse the wikitext (you can see the stats when previewing in old wikitext editor: F31721124), and when you add the time to save the reply via Parsoid and the network transfer, it could possibly exceed 30 seconds on a bad day.
We can make an exception to this behavior, and it might be a good idea here. We've done it for file uploads in the past, where the network transfer can reasonably take much longer than 30 seconds.
There is also a server-side timeout at some point (I'm not sure what it is exactly), so you might run into a similar issue again, but at this point I think the only solution is making the page shorter (e.g. archiving or splitting off some discussions).