Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M3
description: each signed in user pings the DB for updates to its notifications every 12 seconds. However, this process involves a synchronized method that will always wait for 2 seconds unless it is interrupted by an incoming notification. If there are many users and each request on the synchronized method takes 2 seconds, there will be many blocked threads that may cause the portal to hang.
steps to reproduce:
1) connect a portal to an IDE and add a logging breakpoint to com.liferay.portal.poller.SynchronousPollerChannelListener#getNotificationEvents to print out the time whenever the method is executed
2) deploy the notifications portlet and notice that eventually the breakpoint will print out every 12 seconds
3) create another user
4) as the other user sign in with a different browser (leaving the first user signed in)
5) notice that the method is pinged every 6 seconds or so.
add more users who are signed in to different browsers and watch the logging messages.
each request takes 2 seconds because of the following portal.properties:
the thread is waiting for 1000ms to be interrupted and then it sleeps for 1000ms before querying the DB for the notification events
UPDATE: the thread appears to never be interrupted because the listener is not registered to the channel for the user