Global search on my self-hosted instance - RequestError

I recently set up a peertube instance with docker compose. I enabled global search and set the url to https://sepiasearch.org
However whenever I try to use global search I get this error in server log

2025-06-21 07:23:41.042 warn: Cannot use search index to make video search. {
peertube-1  |   "err": {
peertube-1  |     "stack": "RequestError\n    at ClientRequest.<anonymous> (file:///app/node_modules/got/dist/source/core/index.js:673:107)\n    at Object.onceWrapper (node:events:639:26)\n    at ClientRequest.emit (node:events:536:35)\n    at emitErrorEvent (node:_http_client:101:11)\n    at TLSSocket.socketErrorListener (node:_http_client:504:5)\n    at TLSSocket.emit (node:events:524:28)\n    at emitErrorNT (node:internal/streams/destroy:169:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError [ETIMEDOUT]: \n    at internalConnectMultiple (node:net:1122:18)\n    at afterConnectMultiple (node:net:1689:7)",
peertube-1  |     "message": "",
peertube-1  |     "name": "RequestError",
peertube-1  |     "requestHeaders": {
peertube-1  |       "user-agent": "PeerTube/7.2.1 (+https://peertube.mio19.uk)",
peertube-1  |       "date": "Sat, 21 Jun 2025 07:23:39 GMT",
peertube-1  |       "content-type": "application/json",
peertube-1  |       "content-length": "166",
peertube-1  |       "accept": "application/json",
peertube-1  |       "accept-encoding": "gzip, deflate, br",
peertube-1  |       "host": "sepiasearch.org"
peertube-1  |     },
peertube-1  |     "requestUrl": "https://sepiasearch.org/api/v1/search/videos",
peertube-1  |     "requestMethod": "POST"
peertube-1  |   }
peertube-1  | }

What should I do to debug and fix this problem?

I tried following command in the container and confirmed that it is not a network issue:
docker exec -it peertube-peertube-1 bash --login

search_query="Hello World"

scrape_pt() {
    curl -s "https://sepiasearch.org/api/v1/search/videos" \
        -G --data-urlencode "search=$*" |
    grep -oE '"name":"[^"]+|"displayName":"[^"]+|"duration":[0-9]+|"views":[0-9]+|"publishedAt":"[^"]+|"uuid":"[^"]+|"thumbnailUrl":"[^"]+' |
    sed -E 's/"name":"(.*)/Title: \1/' |
    sed -E 's/"displayName":"(.*)/Channel: \1/' |
    sed -E 's/"duration":([0-9]+)/Duration: \1/' |
    sed -E 's/"views":([0-9]+)/Views: \1/' |
    sed -E 's/"publishedAt":"(.*)/Date: \1/' |
    sed -E 's/"uuid":"(.*)/ID: \1/' |
    sed -E 's/"thumbnailUrl":"(.*)/Thumbnail: \1/' |
    awk 'BEGIN{count=0} {print} /^Thumbnail:/ { print ""; count++; if (count==3) exit }'
}

scrape_pt "$search_query"

ID: 9ef38fdd-416c-4b57-94c7-d6c4c0a80fd4
Date: 2018-10-24T07:33:47.827Z
Title: Hello World in Braille on a Pi Zero W
Duration: 6
Thumbnail: https://diode.zone/lazy-static/thumbnails/9ef38fdd-416c-4b57-94c7-d6c4c0a80fd4.jpg

Views: 74
Title: rummik
Channel: *Kim
Title: rummik_channel
Channel: *Kim
ID: 664cc129-ab14-4a5a-858a-5982102d17d5
Date: 2025-05-01T22:15:10.030Z
Title: Hello World #4
Duration: 0
Thumbnail: https://spectra.video/lazy-static/thumbnails/c5da8dac-9e9e-499c-9055-fac75bb3a112.jpg

Views: 65
Title: livcomp
Channel: Dave Ackley
Title: livcomp_live
Channel: Living Computation Live
ID: 8938621e-1923-43f7-90ae-78feafb67a62
Date: 2023-07-06T18:15:43.060Z
Title: Haiku - a Hello World { Louie Zong } animation
Duration: 114
Thumbnail: https://makertube.net/lazy-static/thumbnails/6bffe0e3-ed4a-4912-9ca8-4a9d00b68bce.jpg