Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127111 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 971621A00BC for ; Tue, 15 Apr 2025 08:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1744704660; bh=wftX7A2g/zLxd91nRkIY4m0nilFZeqUjg63V4TIeXeE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=PyCBkCX9G+W+wZvsbQPbJx74sszxzb/Xgq9bt6kw5m9imLc+HcSM4NlW1PXnNip9A DzKY4bGo+u3xZgILiU7EERezb8LsUR+a8kB26JLEVaF1EnAry4ky4eWbrQ83TDPtt/ nAIY7INbEXo5c4XAIS3Y6aVRc22r2hg92tP1qp2IkTdObo9VwFB3iW2Jj9IWxB/31E 2hkxSLgCdY1wOYW4Zvwg8an/lR0suM/jIjYHT6J5t/3MuiSqUNGer/94lhFjyQXNAr h2Lh326rA6fUoisDi27njmbZzNB0ko9COdXRyblBnPIER7xjoXRLjxPUpqRJYADruR jaOKX6mDWNk2Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C79431801D6 for ; Tue, 15 Apr 2025 08:10:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Apr 2025 08:10:58 +0000 (UTC) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-ac73723b2d5so1046416566b.3 for ; Tue, 15 Apr 2025 01:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld.be; s=google; t=1744704799; x=1745309599; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=t4ZO0f5VvlaxsAgCwahnEoTv103IVMezSbEmD9eoPX0=; b=my+x562v9cu+IRclpUCuLw79dvyfvsRxNyXZ+/gEz6iAWbRRac7EsYDQyFfolgWB7F MmU+WIbh4MJQpHii7Y/xEI3NUiB8YiNFo7DpkgfKZ302+wB9r4l2ZsPFpPcMeWwnMA4b ui5L2sHUU31VG033puSXTeLXGr0tz6xJsLex5UNit/RorqtXwgzFTq7odmioPsI1vu1L U0raWt87+GgOkPP/nnSdm8BPLJdvOyU5Z8e8MCsKTJbanjLK+CmAAgUFYkQ8rpcNxRtA A3rKOT9zwfq1+VlHd39T1960YAZ7G1g4Xl3p7dfXaBLRtO+vnDqtVdspBSoLfnpO+bzr 52RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744704799; x=1745309599; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=t4ZO0f5VvlaxsAgCwahnEoTv103IVMezSbEmD9eoPX0=; b=W1tbUVGKprbUoF9fUWN8Ejx1dHh2nq3wvgpjtQ6N8SZlKM6fq/QS71wt/NWltYVHIU t6wq1Ss3xq8BCud+AaYNN+FB3Z9BMTenivS9dvENNz1knpIlnigCcNAwb13dMF1MwplQ FuPb6DrBemAq5O7ZXTGtyS/sczNNvOARYf/V5XGwPG7rFDYfXbsuE7ApnBeb3f/vRsER lXRXw94WPh9vqD2VGsfkNTH/grqIBdYrKbf3jAIsqjhcuHkMB/ywKQTFl8hF7iNzyvkO uxIBu216PCSR/89MHZ/w8TStBk6zbg0nyMdElkO2+cyNil9l3L8Ahq+cbyyXfMtnxEj4 PFvg== X-Forwarded-Encrypted: i=1; AJvYcCXzJe6KaXjY6NT/LYhclsW2RvJecnWz6sUcDVb1Qh0olSK4aeYpLi9WXDWd7ibONJTPyiDMMTqmfsU=@lists.php.net X-Gm-Message-State: AOJu0YzfCVQzCDrGwE3MM3JuLpcUTBJRoq6JHKnY0mDjpbswFnYW+3ej em78WI68Wqb08iqDypsTi1oLscir5tuuz4vYzA8lZejy6SCYoRPvnR9edTrZPkKHQ1X+awRH9RZ hFLU= X-Gm-Gg: ASbGncsh7hknGd8yQXGJ5sGEpchFXmLaOqh0U/4xgL8PdNcOTZSHF+E0K5Iiuwxo3q2 MKopGjHEn3l/aJPq1CiH2YGhN7TT96mJ7dFPFGSqIXB/N+tBJ+685mdh3OzpXTxS6D+jijNFTnU U0JBOspjhdK4TURB8ZTj5wt1fizTeAZqZ1cJiMiFNQU/mfAw2HQTHeoeltNC4Bz0vWrXZo0NJDL SaMohAb0r5lge4XhildRZyPTU2V9ZATnGhatgjD5kpLl8gJ6MBedX6X1YEKFQ2ZyslzTxpwZrzh 7hWiqN7yZAZ2q7g2euXCF7HshAUOHypJpu0lhfTlnaIEVGm1zbKD1ZbbqlQhOU8M2Z+F1a3epNx x1w9L0A== X-Google-Smtp-Source: AGHT+IFNPoEdSCMfdp9iVjgXFtvfld9uxKRCZ12afsG2Vg6SQbTuVInxVyUgrkhHd9MRrOENbJhn/g== X-Received: by 2002:a17:907:7209:b0:ac7:c66a:4702 with SMTP id a640c23a62f3a-acad36d9214mr1477049366b.57.1744704799104; Tue, 15 Apr 2025 01:13:19 -0700 (PDT) Received: from ?IPV6:2a02:168:4b6e:0:52b:6285:a048:3e7f? ([2a02:168:4b6e:0:52b:6285:a048:3e7f]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acaa1ccc0desm1034314766b.124.2025.04.15.01.13.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Apr 2025 01:13:18 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------Efhamh40ztvjrtdZjxa2UpcS" Message-ID: <2c9fc329-8b90-46e8-90ff-f4c4715ee063@seld.be> Date: Tue, 15 Apr 2025 10:13:17 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] New max_memory_limit INI setting To: Ilija Tovilo , PHP internals References: Content-Language: fr In-Reply-To: From: j.boggiano@seld.be (Jordi Boggiano) This is a multi-part message in MIME format. --------------Efhamh40ztvjrtdZjxa2UpcS Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14.04.2025 14:41, Ilija Tovilo wrote: > One open question is whether exceeding the max_memory_limit should > also set memory_limit to max_memory_limit in addition to warning, > giving the subsequent operation a higher chance not to straight out > OOM error. Let me know if you have a preference in that regard. I'd say absolutely yes it should respect the requested memory limit as much as possible. Especially when setting memory_limit to -1 you'd definitely want this to mean "use the max allowed memory limit" and perhaps even skip the warning in that case as it's not a very specific request for a memory amount. Best, Jordi -- Jordi Boggiano @seldaek -https://seld.be --------------Efhamh40ztvjrtdZjxa2UpcS Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 14.04.2025 14:41, Ilija Tovilo wrote:
One open question is whether exceeding the max_memory_limit should
also set memory_limit to max_memory_limit in addition to warning,
giving the subsequent operation a higher chance not to straight out
OOM error. Let me know if you have a preference in that regard.

I'd say absolutely yes it should respect the requested memory limit as much as possible. 

Especially when setting memory_limit to -1 you'd definitely want this to mean "use the max allowed memory limit" and perhaps even skip the warning in that case as it's not a very specific request for a memory amount.

Best,
Jordi

-- 
Jordi Boggiano
@seldaek - https://seld.be
--------------Efhamh40ztvjrtdZjxa2UpcS--