Url is blocked: execution expired Error and Wrong production.log contents

Recently we have upgraded Gitlab to 16.8.2 from 16.7.5 i.e self-hosted CE.
We are getting errors when trying to change any setting from the admin area.
It only loads for a while and after that gives errors like url is blocked: execution expired
Below is the error we are getting:

The form contains the following errors:

  • Help page documentation base url is blocked: execution expired

  • Diagramsnet url is blocked: execution expired

  • Public runner releases url is blocked: execution expired

These same errors while changing any setting

we also tried to look into the production.log file but it’s not showing any error there are only some email logs like the following
delivered mail sdfhj@sdfghjkdfgh.mail (60155.2ms)
Rendered layout layouts/mailer/devise.html.haml (Duration: 8.9ms | Allocations: 1315)

but in exception logs, we are getting
(Gitlab::HTTP_V2::BlockedUrlError) with the message “URL is blocked: execution expired.”

Thanks in advance!

@johncoghlan @aayore @Heroes