Unable to View Certain Contacts

Your software
My Mautic version is: 3.3
My PHP version is: 7.3
My Database type and version is: mysql

Your problem
My problem is:

There are certain contacts that for some strange reason I cannot access their contact card, when I click on the contact it just seems to hang.

These errors are showing in the log:

#5 /var/www/mautic/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\Middleware\CORSMiddlewar…PHP message: Database connection error (code #0) - in file /var/www/mautic/app/AppKernel.php - at line 100" while reading response header from upstream, client:, server: ams.mautic.com, request: “GET /s/contacts/view/22450?_=1619033645396&mauticUserLastActive=2&mauticLastNotificationId=11285 HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: “ams.mautic.com”, referrer: “https://ams.mautic.com/s/contacts

Steps I have tried to fix the problem:
chown -R www-data:www-data on mautic directory
clearing cache
rm -rf /mautic/var/cache

Same here. but there’s no log