|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-05-27 08:23 UTC] nikic@php.net
-Status: Open
+Status: Feedback
[2021-05-27 08:23 UTC] nikic@php.net
[2021-05-27 12:54 UTC] andresr dot alz at gmail dot com
[2021-05-27 13:31 UTC] nikic@php.net
[2021-05-27 13:54 UTC] cmb@php.net
-Status: Feedback
+Status: Analyzed
[2021-05-27 14:02 UTC] nikic@php.net
-Status: Analyzed
+Status: Duplicate
[2021-05-27 14:02 UTC] nikic@php.net
[2021-05-27 14:11 UTC] andresr dot alz at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 17:00:01 2025 UTC |
Description: ------------ #### Dockerfile FROM php:8.0.6-cli RUN docker-php-ext-install pdo_mysql RUN docker-php-ext-enable pdo_mysql COPY . /usr/src/myapp WORKDIR /usr/src/myapp ENTRYPOINT ["php", "testing_pdo.php"] #### This is not happening with php < 7.3 Test script: --------------- // testing_pdo.php <?php ini_set('memory_limit', '-1'); function _get_connection() { print "\nget_connection"; $opt = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, ); try { $dbconn = new PDO( "mysql:host=" . "localhost", "user", "user_test", $opt ); $dbconn->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); return $dbconn; } catch (PDOException $e) { print "Error: $e"; return null; } } function _big_query($dbconn) { print "\nbig query running ..."; $CSV_results = ""; $sql = "SELECT sent_blob from test WHERE id = 1"; $stm = $dbconn->prepare($sql); $stm->execute(); $stm->bindColumn(1, $CSV_results, PDO::PARAM_LOB); $stm->fetch(PDO::FETCH_BOUND); $stm->closeCursor(); return $CSV_results; } print "\nStarting ...."; $conn = _get_connection(); if ($conn != null) { $result = _big_query($conn); print $result; } Expected result: ---------------- Memory on docker container keeps almost the same than network IO Actual result: -------------- Memory is increasing in a weird way