After a few attempts we will usually then receive a “Duplicate submission” response. Obviously a 5xx type error would indicate some sort of origin server issue and we wouldn’t expect the document to have been received.
Do you know the cause of the 504 errors and if the document has been received is it possible instead to issue a 200 OK response?
@glenn - I do not work for companies house, I am only a forum user like yourself and was simply being helpful by pointing you to the xml gateway forum.