Unable to upload (file or images), no errors in the logs

Found the culprit: it was the document search by content feature that stalled the server for some reason. After disabling it, the upload started to work.