I have experienced that SharePoint user profile custom search not working and I observed the issue(Farm solution and it used SharePoint 2019). Then I got this below error message
A failure was reported when trying to invoke a service application: EndpointFailure Process
Name: w3wp
Process ID: 12132
AppDomain Name: /LM/W3SVC/2/ROOT/SecurityTokenServiceApplication-1-133353879586016182
AppDomain ID: 2
Service Application Uri: urn:schemas-microsoft-com:sharepoint:service:a6195aa3a5d845......24c0e9d9c249#authority=urn:uuid:407d09bac7fc......36dbbcde9e35df&authority=
Application side I got this error as well : "ProfileDBCacheServiceClient.GetUserData threw exception: Access is denied"
Any idea on this please help me. Thank you very much.