Xwiki 10.11.3 high CPU usage because NotificationsDisplayerUIX

Hello,

My xwiki 10.11.3 are suddenly very slow and I don’t know how to fix it.
CPU usage is 100%
I restarted my tomcat but CPU still high.
I use javamelody to monitor my xwiki and I can see that /bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX take all ressource :frowning:

Thxs for any help
Pascal B

here some “strange” sql request of … 13s and 4s with weird WHERE condition:
(activityev0_.ase_type=? and activityev0_.ase_date>=? and (activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and …

select activityev0_.ase_eventid as ase1_33_, activityev0_.ase_requestid as ase2_33_, activityev0_.ase_stream as ase3_33_, activityev0_.ase_date as ase4_33_, activityev0_.ase_priority as ase5_33_, activityev0_.ase_type as ase6_33_, activityev0_.ase_application as ase7_33_, activityev0_.ase_user as ase8_33_, activityev0_.ase_wiki as ase9_33_, activityev0_.ase_space as ase10_33_, activityev0_.ase_page as ase11_33_, activityev0_.ase_hidden as ase12_33_, activityev0_.ase_url as ase13_33_, activityev0_.ase_title as ase14_33_, activityev0_.ase_body as ase15_33_, activityev0_.ase_version as ase16_33_, activityev0_.ase_param1 as ase17_33_, activityev0_.ase_param2 as ase18_33_, activityev0_.ase_param3 as ase19_33_, activityev0_.ase_param4 as ase20_33_, activityev0_.ase_param5 as ase21_33_ from activitystream_events activityev0_ where (activityev0_.ase_type=? and activityev0_.ase_date>=? and (activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activityev0_.ase_page=? or activityev0_.ase_wiki=? and activit ...

or

select activityev0_.ase_eventid as ase1_33_, activityev0_.ase_requestid as ase2_33_, activityev0_.ase_stream as ase3_33_, activityev0_.ase_date as ase4_33_, activityev0_.ase_priority as ase5_33_, activityev0_.ase_type as ase6_33_, activityev0_.ase_application as ase7_33_, activityev0_.ase_user as ase8_33_, activityev0_.ase_wiki as ase9_33_, activityev0_.ase_space as ase10_33_, activityev0_.ase_page as ase11_33_, activityev0_.ase_hidden as ase12_33_, activityev0_.ase_url as ase13_33_, activityev0_.ase_title as ase14_33_, activityev0_.ase_body as ase15_33_, activityev0_.ase_version as ase16_33_, activityev0_.ase_param1 as ase17_33_, activityev0_.ase_param2 as ase18_33_, activityev0_.ase_param3 as ase19_33_, activityev0_.ase_param4 as ase20_33_, activityev0_.ase_param5 as ase21_33_ from activitystream_events activityev0_ where (activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or (activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=? or activityev0_.ase_type=? and activityev0_.ase_date>=?) and (((activityev0_.ase_wiki||?)||activityev0_.ase_page) in (select defaultnot1_.nfp_page_only from notification_filter_prefs defaultnot1_ where defaultnot1_.nfp_owner=? and defaultnot1_.nfp_filter_type=0 and defaultnot1_.nfp_filter_name='scopeNotificationFilter' and (defaultnot1_.nfp_page_only is not null) and defaultnot1_.nfp_page_only<>'' and (defaultnot1_.nfp_event_types='' or defaultnot1_.nfp_event_types is null) and defaultnot1_.nfp_alert=true and defaultnot1_.nfp_enabled=true and defaultnot1_.nfp_date<=activityev0_.ase_date))) and (activityev0_.ase_eventid not in (select activityev2_.ases_eventid from activitystream_events_status activityev2_, activitystream_events activityev3_ where activityev2_.ases_eventid=activityev3_.ase_eventid and activityev2_.ases_eventid=activityev0_.ase_eventid and activityev2_.ases_entityid=? and activityev2_.ases_read=true)) and (activityev0_.ase_eventid not in (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ...

I have 34 current request like:
https://MyXwiki.fr/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain&amp;action=getUnreadCount&amp;_=1551796644679

I cleaned tomcat work and temp directory and restart my server.
CPU is calm after that.
javameldoy displayed 0 current request.

With Admin account I can watch my xwiki web site without problem BUT as soon I’m going on my Admin profile: Notifications, my CPU is at 100% again and didn’t decrease anymore!
And javamelody displayed 3 current request on
https://xxxx.fr/bin/get/XWiki/Notifications/Code/NotificationsDisplayerUIX?outputSyntax=plain&amp;action=getUnreadCount&amp;_=1551817954039
.

To fix this issue, I use these settings in xwiki.properties:
xwiki.plugin.watchlist.automaticwatch=none ##without effect alone

watchlist.enabled = true

notifications.enabled = false

With notification enabled and after…: image

Hi Pascal.
Thanks for the report.
I’ve created Loading....
Unfortunately, it is a difficult problem to solve. I have already tried to fix it with Loading..., but apparently it is not enough.

I am not technical and so please be gentle.

Have XWIKI 12.6.1 standard running on a Raspberry Pi4, 4GB ram, SSD (samsung portable ssd t5), standard Pi OS.

Tomcat 8, MySQL, XWIKI 12.6.1 … standard out of the box install

XWIKI response is slow, start, edit, save pages, search

Notifications is active (but only sends once a day)

I am told that one of the CPU’s is constantly (as in 24/7 no matter what the activity on XWIKI) at 100% and it was / is called from Java.

If XWIKI shut down and only Tomcat 8 running, and if make web page requests to Tomcat, then the responses are multi threaded and all 4 CPU’s are active and utilization bounces up and down.

However, when load XWIKI and make the page requests though XWIKI, then:

  1. one CPU goes to 100%

  2. the other CPU’S are not active (ie no multi threaded execution at all).

Anyone else have this issue?

Do I need to instruct my technical expert to shut down notifications (which is an excellent and necessary feature to keep people engaged).

Thanks
CJ

Hello,
First, my avatar is a troll but I’m gentle (I didn’t eat humans … yet).

IMO you haven’t same issue than mine because I suppose than notification issue with high CPU was fixed on later version (my issue was on 10.11.3 version). Maybe you could open a new thread on this forum?

I’m not an xwiki expert but a xwiki admin.
You must watch catalina.out file to find what’s wrong with your XWiki or a monitoring tool like https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Monitoring (I use javamelody).
But first, check your java settings https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Performances/#HMemory you must allowed enough memory to jvm to avoid CPU override.

Pascal B

1 Like

Thank you so much.

I am neither an expert or admin. Just end user.

I will copy your response to my “IT person” who installed XWIKI and request he checks.

And he did notice that memory was being “eaten” (no doubt by an avitar).

Thanks again.