Mac and linux clients slow down to a crawl after 30GB of files transfer

I am a long term Owncloud user and have migrated to Nextcloud for the better feature list. I built a server with

1.Debian 11
2. Redis cache and locking
3. Mariadb
4. Apache2

Server works fine, fixed all the warnings in the security check and the logs.

Following the setup, I installed the latest linux client on my workstation (Debian 11) and dumped 72,000 files in there for a total of about 37 GB.

Sync was not fast, but acceptable for the first 30GB which copied over in about 5 hours. The remaining 7GB just slowed to a crawl and would not complete.

I decided to rebuild the server again and use PostgreSQL DB instead.
I used an (intel) MAC this time as the client and installed the latest desktop client. I dumped the same number of files and saw exactly the same behaviour.

Reasonable but not fast initial transfer and then slowing to a crawl for the last 7GB or so. So far, Nextcloud has taken over 12 hours to sync the last 7GB and its still not finished. The nextcloud GUI also becomes unresponsive in both cases after a while then will come back after a few mins.

In both cases, the server has minimal usage and not stressed at all.

Does anyone have any ideas how to solve this? I feel it is a client issue since the same thing happened on two different OS’s and there is a big thread here, discussing a similar thing on Windows.