|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-11-30 14:48 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2017-11-30 14:48 UTC] requinix@php.net
[2017-11-30 15:39 UTC] markus at prepaid-order dot com
-Status: Feedback
+Status: Open
[2017-11-30 15:39 UTC] markus at prepaid-order dot com
[2021-04-09 13:00 UTC] dharman@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: dharman
[2021-04-09 13:00 UTC] dharman@php.net
[2021-04-18 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 17:00:02 2025 UTC |
Description: ------------ simple mariadb PDO connect and give result after success... when Database is available all worked fine.... shut down DB instance manual and host is not available call simple php script with this function... if Database is down catch block will not work and php is working and after that following Message appear. Fatal error: Allowed memory size of 629145600 bytes exhausted (tried to allocate 20480 bytes) my php function shows like this. the Code worked before,source code have never changed. tested with arbitrary php_memory limit,but the issue is still available... testet with php 5.6,7.0,7.1 (default)... it works fine with 7.1,but have no idea... timeout array in PDO constructor have also removed... Test script: --------------- > function getDBConnection() > { > global $pdo; > try { > if ($pdo == null) > $pdo = new PDO( > > 'mysql:host=databaseHost;dbname=someDatabase;charset=utf8mb4', > 'removed', > 'removed_too' > ); > } catch (Exception $ex) { > > generateErrorPlistWithFailReason(ErrorCodes::DATABASE_IS_DOWN, > exit(); > } > return $pdo; > } Expected result: ---------------- resource result and or result from catch block (if databse is down/notavailable)... Actual result: -------------- after timeout Fatal error: Allowed memory size of 629145600 bytes exhausted (tried to allocate 20480 bytes)