Writing in a directory shared with an AD group is very slow

Hi,

I have set up Nextcloud for my company but now I’m facing a strange issue.
Nextcloud is set to fetch all the users and their groups from active directory which it does it with no problem.
All our company’s documents/data is stored under some directories which are shared from Nextcloud’s admin account with other Nextcloud users.
Now here comes the problem, if someone tries to write into these shared folders (copy into it, delete from it or make a new folder), it will take forever. As soon as you remove the share from that folder, it becomes normal again.
FYI:

  1. writing into directories other than these shared ones is ok.
  2. shared directories are created inside admin user data directory and then scanned using sudo -u apache /opt/rh/php55/root/usr/bin/php occ files:scan admin.

Now as a test, on separate server, I installed Nextcloud and created the same amount of users and groups but inside Nextcloud itself and made some folders and shared them with those internal user and groups and it was writing worked with no problem.

I honestly don’t know what’s going on and need to resolve this as soon as possible. I would appreciate any hint/help on this issue.

Server OS: CentOS 7 (3.10.0-327.36.3.el7.x86_64)
NextCloud Version: 10.0.1
Active Directory: Windows Server 2008 R2

Nextcloud Server info page:

Number of users: 481
Number of groups: 32

Storage
Users: 37
Files: 1912669

PHP Version: 5.5.21
Memory Limit: 5.0 GB
Max Execution Time: 3600
Upload max size: 5.0 GB

Database
Type: mysql
Version: 5.6.34
Size: 1.1 GB

UPDATE: This problem disappeared by disabling Activity app (Version 2.3.2). As soon as this app is disabled, everything worked smoothly.