|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70900 SoapClient systematic out of memory error
Submitted: 2015-11-12 10:33 UTC Modified: 2015-11-12 17:39 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: benjamin dot morel at gmail dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.6 OS: Fedora 23
Private report: No CVE-ID: None
 [2015-11-12 10:33 UTC] benjamin dot morel at gmail dot com
I cannot instantiate a single SoapClient instance, without getting a memory error.
I raised memory_limit to 1GB, but this didn't change anything: now the library tries to allocate 1.5GB of memory for some obscure reason.

Note that this occurs *before* the SOAP client downloads the WSDL file, as I get this exception in less than 1ms.

Test script:
new \SoapClient(

Actual result:
SoapFault exception: [Client] Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1644167200 bytes)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-12 10:37 UTC] benjamin dot morel at gmail dot com
Actually this bug had already been reported as far as in PHP 7.0.0alpha2, but due to the original reporter not answer the question, it's been closed:

But it's definitely still present in RC7.

Hopefully you'll be able to reproduce it with this one-liner.
 [2015-11-12 16:10 UTC]
-Assigned To: +Assigned To: dmitry
 [2015-11-12 16:58 UTC]
-PHP Version: 7.0.0RC7 +PHP Version: 5.6
 [2015-11-12 16:58 UTC]
@benjamin Thanks for the repro case.

So far I was checking, same is reproduceable with 5.6 as well. It has something to do with serealization/deserealization of WSDL. Only reproduceable on second call after the cached WSDL gets deserialized, so soap.wsdl_cache_dir=/some/valid/dir is required to repro.

 [2015-11-12 17:37 UTC]
Automatic comment on behalf of
Log: Fixed bug #70900 (SoapClient systematic out of memory error)
 [2015-11-12 17:37 UTC]
-Status: Assigned +Status: Closed
 [2015-11-12 17:39 UTC]
you'll have to manually clean WSDL cache (rm /tmp/wsdl-*) after update.
 [2015-11-12 21:50 UTC] benjamin dot morel at gmail dot com
@dmitry, works a treat with your latest commit! Thanks so much.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Nov 30 15:01:27 2023 UTC