I am currently investigating a weird problem which I have using the MarkLogic Query Console
. When I edit a file and click the save button the browser shows the message
Query Console lost connection to the server. Attempting to re-establish connection.
In the server logs I found this error:
Socket peer name error: getpeername <ip-addr>:8000: Transport endpoint is not connected
But this only happens when the file I want to save exceeds a certain size (about 3.5 kB). I suspect that something in the (networking) infrastructure I use might be causing this issue, so I started to look at the request which is sent by my browser.
I was very surprised to see that it uses a GET
request to send the contents of the file, I would have expected a POST
. Actually, when the file gets bigger, the URL (and thus the sent content) is truncated at some point, which is probably causing my issue.
My question is: why is it using a GET
request? Is is possible to change it to a POST
somehow? I think this would solve my problem.
BTW, I am using MarkLogic 9.0-7.2 currently, not sure if this is relevant.
The save action should be done via POST, for security reasons and to avoid max-length of URL.
This issue has since been addressed, and will perform a POST in newer versions of MarkLogic.
I just verified that when saving a document via Query Console edit in 10.0-5.2 the document content is sent via POST and successfully saved an 8MB file.
You should upgrade to the latest version of MarkLogic.