boinc icon indicating copy to clipboard operation
boinc copied to clipboard

The python API should gracefully handle fatal errors from Apache

Open lfield opened this issue 6 years ago • 0 comments

When trying to submit 30K jobs using the python API, the following response was returned:

REPLY: <?xml version="1.0" encoding="ISO-8859-1" ?>
<submit_batch>
<br />
<b>Fatal error</b>:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 2883692 bytes) in <b>/boincdata/boinc/project/lhcathome-dev/html/user/submit_rpc_handler.php</b> on line <b>230</b><br />

This led to the following exception:

Traceback (most recent call last):
  File "submit.py", line 38, in <module>
    response = submit_batch(b)
  File "/home/lfield/cernbox/vc/boinc-rpc/submit_api.py", line 203, in submit_batch
    return do_http_post(req.to_xml('submit_batch'), req.project)
  File "/home/lfield/cernbox/vc/boinc-rpc/submit_api.py", line 121, in do_http_post
    return ET.fromstring(reply)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1312, in XML
    return parser.close()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1671, in close
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1523, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: no element found: line 5, column 0

lfield avatar Nov 01 '18 09:11 lfield