Bug 1151941 - java/lang/OutOfMemoryError when running client.schedule.listFailedActions API call on big DB
Summary: java/lang/OutOfMemoryError when running client.schedule.listFailedActions API...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 560
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat570-postga
TreeView+ depends on / blocked
 
Reported: 2014-10-13 07:00 UTC by Jan Hutař
Modified: 2018-04-09 11:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-09 11:24:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2014-10-13 07:00:27 UTC
Description of problem:
There is "java/lang/OutOfMemoryError" error when running client.schedule.listFailedActions API call on big DB (not instantly, but after few minutes).


Version-Release number of selected component (if applicable):
spacewalk-java-2.0.2-87.el6sat.noarch
spacewalk-schema-2.0.2-17.el6sat.noarch
satellite-schema-5.6.0.19-3.el6sat.noarch


How reproducible:
always with given DB dump


Steps to Reproduce:
1. Have Satellite with big DB dump
2. In python shell run:
   >>> import xmlrpclib
   >>> client = xmlrpclib.Server('https://<fqdn>/rpc/api', verbose=0)
   >>> key = client.auth.login('<user>', '<pass>')
   >>> failed_list = client.schedule.listFailedActions(key)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: java.lang.reflect.InvocationTargetException'>


Actual results:
OutOfMemoryError. For full logs see attachement.


Expected results:
API call should work


Additional info:
This was reported while working on bug 1115149.

Comment 3 Jan Hutař 2014-10-13 07:35:01 UTC
Reusing workaround noted in https://access.redhat.com/solutions/93253 there is 45326 actions in the DB (do nt know if it is a lot or few):

# spacewalk-sql -i
psql (8.4.20)
Type "help" for help.

rhnschema=# SELECT COUNT(*) FROM rhnAction WHERE id in
rhnschema-# (select id from rhnUserActionOverview
rhnschema(# where org_id = 1
rhnschema(# and user_id = 1
rhnschema(# and action_status_id = 2
rhnschema(# and archived = 0);
 count 
-------
 45326
(1 row)

Comment 4 Jan Hutař 2014-10-13 07:39:10 UTC
Surprisingly client.schedule.listCompletedActions API call works as expected:

>>> completed_list = client.schedule.listCompletedActions(key)
>>> len(completed_list)
45326

anyway, client.schedule.archiveActions fails on this number of actions:

>>> archive_result=client.schedule.archiveActions(key,action_ids)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1243, in request
    headers
xmlrpclib.ProtocolError: <ProtocolError for ibm-x3250m4-09.rhts.eng.bos.redhat.com/rpc/api: 503 Service Temporarily Unavailable>

Comment 5 Tomas Lestach 2018-04-09 11:24:53 UTC
We have re-reviewed this bug, as part of an ongoing effort to improve Satellite/Proxy feature and bug updates, review and backlog.

This is a low priority bug and has no currently open customer cases. While this bug may still valid, we do not see it being implemented prior to the EOL of the Satellite 5.x product. As such, this is being CLOSED DEFERRED. 

Closing now to help set customer expectations as early as possible. You are welcome to re-open this bug if needed.


Note You need to log in before you can comment on or make changes to this bug.