504 gateway timeout on wiki pages list

Hello everyone,
I am using GitLab Community Edition 13.7.7 and I need to create projects that have a lot of wiki pages with only attachments as content, the size of the wiki pages is very low.
With projects that have a little number of wiki pages I have no problem at all, but I have problems when projects have a lot of wiki pages, in particular I have a project with 171 wiki pages and I obtain an error when I try to access at

http://<gitalb_host>/<project_name>/-/wikis/pages

The error is

504 Gateway Time-out
The server didn’t respond in time.

Checking the logs I found this:

==> /var/log/gitlab/gitlab-workhorse/current <==
{"correlation_id":"01FCR39WGY3HQZD6A2FR74JCM8","duration_ms":30000,"error":"badgateway: failed to receive response: context canceled","level":"error","method":"GET","msg":"error","time":"2021-08-10T13:16:51Z","uri":"/<project_name>/-/wikis/pages"}
{"content_type":"text/html; charset=utf-8","correlation_id":"01FCR39WGY3HQZD6A2FR74JCM8","duration_ms":30001,"host":"<gitalb_host>","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"http://<gitalb_host>/<project_name>/-/wikis/home","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","route":"","status":502,"system":"http","time":"2021-08-10T13:16:51Z","ttfb_ms":30001,"uri":"/<project_name>/-/wikis/pages","user_agent":"Mozilla/5.0  (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","written_bytes":2940}

Do you have any suggestion on how to resolve this issue?
One solution could be to change the timeout with a greater value, but I can’t find the right property, do you know which is the right one and where can I find it?

Thank you