Jive Software Open Source

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Openfire
  • OF-39

The storage of items in memory in a persistent LeafNode is a memory leak

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.7.2
  • Component/s: PubSub
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

The current implementation stores all published items to a node in memory. This is not scalable and will easily cause out of memory errors as items published to all nodes accumulates. The larger the payload, the quicker this will happen.

I would suggest that there are 2 possible solutions.
1. Store only the id in long term memory. The published items would only be stored in memory while they are waiting to be persisted. This will drastically reduce the memory footprint while allowing easy checks to see if the same item is being overwritten.
2. Store only the last item in memory. The check for overwriting an existing record can be done and handled (when there is an id match) in the persistence manager. This would maintain no id's or items in memory (other than the last item published).

Issue Links

is duplicated by

Bug - A problem which impairs or prevents the functions of the product. OF-439 Memory leak in PEP service

  • Critical - Crashes, loss of data, severe memory leak.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Source
  • Reviews
  • Builds
Hide
Permalink
Robin Collier added a comment - 02/26/12 09:49 PM

All in memory storage of published items has been removed from the pubsub and pep service, as well as the leaf nodes.

All responsibility for persistence has been moved into the PubsubPersistenceManager, as well as for any retrieval operations.

I would speculate that this will eliminate the memory leak related to pep as well, as it was likely caused by the same problem mentioned here.

Basically, if a persistent node is defined with a large or infinite size, it will continue to store all items for that node in memory. Enough data will cause IndexOutOfBounds exceptions in internal queues, or a large number of nodes will cause OutOfMemoryErrors.

Both of these issues should now be handled properly.

Show
Robin Collier added a comment - 02/26/12 09:49 PM All in memory storage of published items has been removed from the pubsub and pep service, as well as the leaf nodes. All responsibility for persistence has been moved into the PubsubPersistenceManager, as well as for any retrieval operations. I would speculate that this will eliminate the memory leak related to pep as well, as it was likely caused by the same problem mentioned here. Basically, if a persistent node is defined with a large or infinite size, it will continue to store all items for that node in memory. Enough data will cause IndexOutOfBounds exceptions in internal queues, or a large number of nodes will cause OutOfMemoryErrors. Both of these issues should now be handled properly.
Hide
Permalink
Thomas Camaran added a comment - 03/24/12 06:11 AM

hi,
my pubsub content are lost every login, it's normal?

Show
Thomas Camaran added a comment - 03/24/12 06:11 AM hi, my pubsub content are lost every login, it's normal?
Hide
Permalink
Robin Collier added a comment - 03/24/12 07:48 AM

If the node is persistent, then the content is stored in the database and retrievable by a request to get the items.

Show
Robin Collier added a comment - 03/24/12 07:48 AM If the node is persistent, then the content is stored in the database and retrievable by a request to get the items.
Hide
Permalink
Thomas Camaran added a comment - 03/26/12 03:35 AM

how i can seti is persistent?

Show
Thomas Camaran added a comment - 03/26/12 03:35 AM how i can seti is persistent?
Hide
Permalink
Robin Collier added a comment - 04/11/12 12:05 PM

It is part of the node configuration. Look up #persist_items.
http://xmpp.org/extensions/xep-0060.html#owner-configure

Show
Robin Collier added a comment - 04/11/12 12:05 PM It is part of the node configuration. Look up #persist_items. http://xmpp.org/extensions/xep-0060.html#owner-configure

People

  • Assignee:
    Robin Collier
    Reporter:
    Robin Collier
Vote (2)
Watch (4)

Dates

  • Created:
    07/17/09 06:51 PM
    Updated:
    04/11/12 12:05 PM
    Resolved:
    02/26/12 09:49 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for igniterealtime.org. Try JIRA - bug tracking software for your team.