[SOLVED sort of] CIFS/SMB SAMBA access shows delay - DNS issue

From one day to another the file access to my samba shares showed a strange delay when accessing them. For example if the files view is clicked, all local files and directories are displayed instantly and usually you could watch the authentication on the samba shares within far less then a second.
All of a sudden, the authentication period where the external shares have a gray background and lighten up on successful connection grew to about 15 seconds until all 6 shares are connected.

There are no relevant errors neither in nextcloud log (also with log level 0) nor in the samba log. It just takes its time. The authentication method is set to Global credentials, user entered, but the behavior isn’t different with other methods.
Also the sync clients are affected as they take much more time for the same amount of synchronisation.

It’s blazing fast to access the very same samba shares with the very same user from a Windows 10 installation.

Nextcloud runs on docker and the host where samba is located is an Ubuntu LTS. My docker build is derived from the full example and has the php extensions from smbclient and inotify added. I run this configuration for at least 2.5 years without any issues since.
An Ubuntu upgrade from 18.04 to 20.04 didn’t change much, although the samba server was updated to a pretty recent version (4.12.5)

Looks like there’s some kind of check that has to time out on every file access. I’m really helpless on this. I’m using Redis for locking and distributed caching and APCu local caching in nextcloud.

I’m running out of ideas where to look. Any ideas would be highly appreciated.
Thanks for your effort in advance.

Hi,
found it out by myself. It was an DNS resolution issue. Don’t know exactly why, but when I enter the IP instead of the host name the problem is gone.