|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68838 XMLReader::open stops working under php-fpm after about 30min
Submitted: 2015-01-15 15:50 UTC Modified: 2021-01-17 04:22 UTC
Avg. Score:3.0 ± 1.6
Reproduced:2 of 3 (66.7%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: fs at gigacodes dot de Assigned: cmb (profile)
Status: No Feedback Package: XML Reader
PHP Version: 5.5.20 OS: Centos 7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-01-15 15:50 UTC] fs at gigacodes dot de
the xmlreader open call will function correctly for about 15-30minutes after starting php-fpm. After that it will not even try to access the remote url and fail with an "failed to load external entity" error.
In an strace i can sometimes see that it will do a 'stat' system call on the url (which is quite weird) but will not even try to do anything else.
When i restart php-fpm it will work immediately again for about 30 min.
The wsdl file in the test is just a public weather api i used for reproducing.
We initially encountered this problem within SOAPClient but could track it down to XMLReader.

System is a CentOS 7 with all updates (as of 15.01.15) and a php-5.5.20 compiled with:
./configure  --prefix=/home/php-${version} --with-mysql --with-gd --with-curl --with-zlib --with-jpeg-dir=/usr/lib/ --with-iconv --with-pdo-mysql=mysqlnd --with-openssl --enable-mbstring --with-mysqli --with-gettext --enable-sockets --with-mcrypt --with-freetype-dir=/usr --enable-soap --with-xsl --enable-opcache --with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib --enable-sysvsem --enable-fpm --enable-pcntl --enable-bcmath --with-gmp

Test script:

function loadXML() {
  try {
    $xml = new XMLReader();
    $xml->setParserProperty(XMLReader::VALIDATE, true);
    var_dump($xml->isValid()) . "\n";
    return null;
  } catch (Exception $e) {
    return $e;

$start = new DateTime();
echo "Start: ". $start->format('Y-m-d H:i:s') ."\n";
$e = loadXML();


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-16 21:06 UTC]
Do you have any idea if it's just time based, or is it related to the number of requests made?

And have you ever seen the same behaviour when running a test from the CLI?
 [2015-01-19 09:19 UTC] fs at gigacodes dot de
It seems to only be somewhat time-based. I tried calling the script once per second and it occured after 15min and when i called every 30 sec it was the same.
The problem does not occur on cli! I enclosed the script in a for loop and let it run for 2h without problems. Same thing when it's a for loop in the fpm script.
The problem only seems to occur when using separate requests to fpm.
 [2021-01-06 14:25 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-01-06 14:25 UTC]
Is that still an issue with any of the actively supported PHP

[1] <>
 [2021-01-17 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 03:01:28 2024 UTC