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

Summary
On a self-hosted instance, users are unable to attach files or images to their post, even when small in size (e.g. 10kb PNG image). The upload remains in pending state and the message cannot be sent.

Steps to reproduce

  1. Install mattermost team edition via docker, docker.io/mattermost/mattermost-team-edition:8.0
  2. Invite users.
  3. Anyone tries to upload a file.
  4. The upload get stuck.
# mmctl version
mmctl:
Version:	8.0.0
GitCommit:	90f502dc2dc80ee25cfb7d7bc3e743b53564a5a7
GitTreeState:	clean
BuildDate:	Mon Jul 10 03:45:05 UTC 2023
GoVersion:	go1.19.5
Compiler:	gc
Platform:	linux/amd64

Expected behavior
Either a server error from the log or the UI, or the file uploading successfully.

Observed behavior
On a self-hosted instance, users are unable to attach images or files to their messages. The file remains stuck in “processing…” state forever, even after leaving the conversation and getting back to it later; it can be removed from the message, but cannot be drafted (that is, drafts will not include the uploaded file).

The file is uploaded to the server: I can see the file correctly uploaded in a directory like

mattermost/data/20230725/teams/noteam/channels/<uuid>/users/<uuid>/<uuid>/myfile.zip

Logs show messages like the following, with no sign of error:

{"timestamp":"2023-07-25 10:00:15.354 Z","level":"debug","msg":"Received HTTP request","caller":"web/handlers.go:159","method":"POST","url":"/api/v4/channels/members/me/view","request_id":"ta7zq9fzetbh9kuqth45kux66w","status_code":"200"}

All plugins were disabled for this test.

tail-ing and grep-ping the logs by my user ID (obtained from the system console) or the room name (taken from the room info panel) yields no output:

tail -f logs/mattermost.log | egrep -i "<myUUID>|<roomUUID>"
<no output>

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.

Hm, this is a workaround but not a solution. Search by document shouldn’t be a problem on file upload. What kind of search are you using (Database (default), Bleve or Elasticsearch (license)?

@jprusch1 This post hasn’t been responded to in a while, but I’m experiencing identical issues as in the OP. I’m running v8.1.9 at the moment. If I set ‘Enable document search by content’ to false, it allows uploads to occur and doesn’t get stuck in ‘processing’. Once I set it to true, uploads remain in the ‘processing’ phase.

I’m just using the default database search. Any additional troubleshooting steps that you could think of?