|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-07-25 18:48 UTC] john357smith at gmail dot com
[2018-07-25 19:06 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2018-07-25 19:06 UTC] requinix@php.net
[2018-09-08 11:46 UTC] john357smith at gmail dot com
-Status: Feedback
+Status: Open
[2018-09-08 11:46 UTC] john357smith at gmail dot com
[2018-11-02 07:01 UTC] john357smith at gmail dot com
[2019-03-26 16:21 UTC] mike@php.net
[2025-06-05 20:57 UTC] bukka@php.net
-Status: Open
+Status: Not a bug
-Assigned To:
+Assigned To: bukka
[2025-06-05 20:57 UTC] bukka@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
Description: ------------ When cURL is used with CURLOPT_SSL_VERIFYPEER set to TRUE or even without setting it (= default value is TRUE) there is a memory leakage with every call causing memory usage of php process to be constantly increasing. memory_get_usage() reports still the same value so it must be core problem. Keep test script running for more than 1 hour to see difference in memory usage (e.g. with top/htop etc.) After running this script for 24 hours I got 50% of system memory to be used (cca 2GB)! Test script: --------------- error_reporting((E_ALL)); while (TRUE) { $url = "https://www.yahoo.com/"; echo("Fetching $url ... \n"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_NOBODY, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); curl_exec($ch); curl_close($ch); usleep(200000); } Expected result: ---------------- No memory leakage even when script is running forever. Actual result: -------------- Memory usage is constantly increasing in time.