I have a python program using POST request to consume API, writen in PHP and running on an Apache2 server (in local for the moment).
I try several times and I have no problem, but after some tries and retries I have the following error :
[Tue Apr 09 16:39:47.969216 2019] [php7:notice] [pid 17215] [client 127.0.0.1:47164] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 139624576 bytes) in Unknown on line 0 [Tue Apr 09 16:39:48.760054 2019] [core:notice] [pid 1951] AH00051: child pid 17215 exit signal Segmentation fault (11), possible coredump in /etc/apache2
I try to search some clues but I didn't find anything, and I don't understand the problem because I didn't touch the code between the multiple tries.
EDIT : If I try again, the value of Tried to allocate XXXX bytes
increase each time
EDIT : In Python here is the line where I have an error requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
:
data = {
'encodedFile' : base64.b64encode(fileContent),
'priority' : Config.cfg['OCForMaarch']['priority'],
'status' : Config.cfg['OCForMaarch']['status'],
'type_id' : Config.cfg['OCForMaarch']['type_id'],
'format' : Config.cfg['OCForMaarch']['format'],
'category_id' : Config.cfg['OCForMaarch']['category_id'],
'subject' : subject,
'destination' : destination,
'address_id' : contact['id'],
'exp_contact_id': contact['contact_id'],
'doc_date' : date
}
res = requests.post(self.baseUrl + 'resources', auth=self.auth, data=data)
Thanks for the help