php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43038 Memory Allocaltion Failure on versions 5.2.1 and up
Submitted: 2007-10-19 14:00 UTC Modified: 2007-11-05 15:55 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mike dot simonds at maxim-ic dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.2CVS-2007-10-22 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mike dot simonds at maxim-ic dot com
New email:
PHP Version: OS:

 

 [2007-10-19 14:00 UTC] mike dot simonds at maxim-ic dot com
Description:
------------
I have a set of scripts which connect to Salesforce.com's API and retrieve data from our instance and stores them in either an Oracle Database or MySQL.  These scripts are identical, just the retrieving SQL statement is different.   The Memory leak error happens when the scripts with large data sets perform the extract.  The reason that I am reporting this bug is that these scripts performed flawlessly in all php version 5.* prior to upgrading to 5.2.1 and up.  The servers that house these scripts are currently running 5.2.0

Reproduce code:
---------------
source of code >  http://www.mikesimonds.com/soap_php_bug.phps

Expected result:
----------------
I expected the data to be retrieved and inserted into our target database without any errors as it did with versions prior to 5.2.1.  These data sets number in the 130,000 count and have 40-60 rows in each table

Actual result:
--------------
Error Results: 

Fatal error: Uncaught SoapFault exception: [Client] Allowed memory size of 134217728 bytes exhausted (tried to allocate 1856074 bytes) in C:\wamp\www\includes\soapclient\SforceBaseClient.php:506 Stack trace: #0 [internal function]: SoapClient->__call('queryMore', Array) #1 C:\wamp\www\includes\soapclient\SforceBaseClient.php(506): SoapClient->queryMore(Object(stdClass)) #2 C:\wamp\www\extract\export_product2.php(122): SforceBaseClient->queryMore('01g40000001pM0w...') #3 C:\wamp\www\extract\export_product2.php(28): get_products(Object(SforcePartnerClient)) #4 {main} thrown in C:\wamp\www\includes\soapclient\SforceBaseClient.php on line 506

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-22 13:21 UTC] mike dot simonds at maxim-ic dot com
We tried a CVS version for both Linux and Windows on Sunday and still received the same error/fault

Thanks,
Mike
 [2007-10-23 09:26 UTC] jani@php.net
Assigned to the SOAP extension maintainer.
 [2007-10-24 06:28 UTC] dmitry@php.net
Sorry, but could you please provide a complete example that demonstrates the bug and doesn't require your password.
 [2007-10-24 17:32 UTC] mike dot simonds at maxim-ic dot com
Dmitry 

Thanks for the quick response.  There is no way that I can write a script that allows access to this data without giving you access to the script, password & username, or our salesforce.com instance.  I am in contact with the developers over at salesforce now trying to get access to a testing area where I can reproduce this error. The data that is being accessed is sensitive data from my organization.  I can however send you a link so you can run the script and see the error from the exact script that I posted in the orignial post

Sorry for this sir!

Regards,
Mike
 [2007-10-25 14:43 UTC] mike dot simonds at maxim-ic dot com
I wanted to explain to you the reasoning why I cannot 1) give you access to the area where this error is occurring, and 2) why I cannot create a functional script without a user and password.

1) these scripts contain and retrieve company sensitive data and I do not have the authority to be able to let you have access to this data.

2) The script(s) work with Salesforce.com's API and it is necessary to have an ID and Password to login 


I have a meeting today with Salesforce to discuss the possibility of setting up some sort of test area to be able to replicate this error.

I can however, and if you agree, send you some links to two identical servers.  One server will run php 5.2.0 and an export script and work just fine. One server will be running the latest CVS version of PHP 5.2.4 and will error.  I cannot post these two URL's in the Bug due to private addresses.

Please let me know if this can be done

I will post this in the bug to keep it updated
 [2007-10-29 11:41 UTC] mike dot simonds at maxim-ic dot com
Dmitry

I have been in contact with Salesforce support and they are going to temporarily assign me an instance so I can reproduce the error.  I am should have an area loaded today with bogus records to test the extract and reproduce the error today.  I will then email you the scripts that cause the error


~Mike
 [2007-11-02 18:36 UTC] mike dot simonds at maxim-ic dot com
I have finally gathered all the scripts into one package and emailed Dmitry the zip file to be able to reproduce the error
 [2007-11-05 15:55 UTC] dmitry@php.net
The problem is releated to application that tries to collect enormous amount of data. After keeping more then 54,000 of recored in one array it outs of memory.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC