Sharing contact list group to all users takes a very long time

Active Directory, MS SQL, Openfire 4.2.1 (Centos 7), 700 users in a roster, 30 contact list groups.
When I try to share a list of contacts with others, it takes about 5 minutes. Many messages appear in warn.log:

2017.12.11 17:10:27 org.jivesoftware.openfire.roster.Roster - Unexpected error while deleting user '_someuser@jabber.domain_' from shared group '_GroupName_'!
org.jivesoftware.openfire.user.UserNotFoundException: _someuser@jabber.domain_
	at org.jivesoftware.openfire.roster.Roster.getRosterItem(Roster.java:218)
	at org.jivesoftware.openfire.roster.Roster.deleteSharedUser(Roster.java:981)
	at org.jivesoftware.openfire.roster.RosterManager.groupUserDeleted(RosterManager.java:748)
	at org.jivesoftware.openfire.roster.RosterManager.groupModified(RosterManager.java:338)
	at org.jivesoftware.openfire.event.GroupEventDispatcher.dispatchEvent(GroupEventDispatcher.java:145)
	at org.jivesoftware.openfire.group.DefaultGroupPropertyMap.insertProperty(DefaultGroupPropertyMap.java:483)
	at org.jivesoftware.openfire.group.DefaultGroupPropertyMap.put(DefaultGroupPropertyMap.java:78)
	at org.jivesoftware.openfire.group.DefaultGroupPropertyMap.put(DefaultGroupPropertyMap.java:89)
	at org.jivesoftware.openfire.admin.group_002dedit_jsp._jspService(group_002dedit_jsp.java:274)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:73)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:226)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:215)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:748)
2017.12.11 17:10:27 org.jivesoftware.util.cache.DefaultCache - Cache Roster was full, shrinked to 90% in 0ms.

Roster cash size - 5Mb, tried to increase to 20, the same error after start sharing group.
In Previously used Openfire 4.1.2, this error was not observed. Openfire 4.2.1 was fresh installed in new db.

Are you certain that all of these users are within the same _jabber.domain has your current server’s xmpp.domain setting?

Yes, only one xmpp domain, all users have the same configuration.

I’m seeing the same thing on Openfire 4.2.2, MySQL, Centos 7, 221 users, 26 groups.

Based on another post, I increased the roster cache to 10MB, but the issue is still occurring.

Specifically, I tried deleting a user from the server. When I do, the messages that come up are:

Unexpected error while deleting user ‘user@domain.com’ from shared group ‘group’!

However, the group mentioned in the event message is not a group the user was a part of. It seems to be looping through all the groups on our system attempting to remove the person from groups they never belonged to.

Not sure if it’s relevant, but the following warning message was mixed into the all.log around the time of the other event:

Cache Roster was full, shrinked to 90% in 0ms.

I cleared the roster cache, which was 97% full

Same problem! Openfire 4.2.3. Tested with embedded DB and Microsoft SQL Server. Get repeating errors in log files:
org.jivesoftware.openfire.roster.Roster - Unexpected error while broadcasting shared group rename for user ‘name@domain.local’!
org.jivesoftware.openfire.user.UserNotFoundException: name@domain.local
Need solution!