Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126248 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 2D84D1A00BC for ; Thu, 30 Jan 2025 18:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1738260861; bh=Bhpi/50jJmWsKaSQZzYHdqMfyd5ivZPyQa+J/kIhixg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Bj4X21p2+Qd2+3ml5MF214GoXhYwEeUx0RTM3Xnj/9E1YF6AxWjcbWkHpgF+GiQ1C G5BkX+LzViAYRv/WbpqM98wwmxi20eKE8w+g2QNcwy1CTETH95BAGrXvm0Mz531MUC RHyFTeOoSNuhoh9NBQlVcqLF0SW7av+OebtmTV8fCh0Kk59WlGPqXiWno/iqsQIgR7 A6aAokIcE/SF0AJoimLLiMqYpE5VfmfDiDLjouadY6erjXaPEPs1t7vbsdEzZ7yhu5 10F46QLz/tRwnAgJGfomFXNPuxDLNAot1OeRg9YNzKbzht5Ii2aWktKX2dbB3s3sKA O90d1U5Ql5g8A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 936B8180746 for ; Thu, 30 Jan 2025 18:14:20 +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=-1.2 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 ; Thu, 30 Jan 2025 18:14:20 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-467918c360aso11473621cf.0 for ; Thu, 30 Jan 2025 10:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ethaniel.com; s=google; t=1738261027; x=1738865827; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Bhpi/50jJmWsKaSQZzYHdqMfyd5ivZPyQa+J/kIhixg=; b=PkR9olJ2uvIV+54fXGfpqDPYviRzUOtAnCYxJeyzR5gR9ClBrTxYUihVd2QJq/6u0i vsb0Atlf8v6YvmPk4ugyjE2x6i4wttEkSzYUc9WgX9KWs3xsMt/6VkusmKTsyW7FyLNN RO4GVMfLzJSNev2ONrRvkjkEtO8y+Kq3vtjaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738261027; x=1738865827; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Bhpi/50jJmWsKaSQZzYHdqMfyd5ivZPyQa+J/kIhixg=; b=mitzik578drUg4LhPx4xR9D3An+cEyIccfB7Wtg2bQLGb/forhIpWEXLD+bF1OgRX0 IxSAD4rzIxkIRqJav2leDz1PMuretJVRYgQpClHwjcvb6hDjpwqyj57gwgdGLMgCnJtL +K8vtZgEC49q96KkNlFpfAqL2XIAkFcudb6qBxHjEsYhlnPj/FoTBIks0R+IgvF/kdis 6CzDDRA+b6HqPXDAUgsKX5rqqbRzBXIziD7fb9hemIR1oCEglRyIlEtdmD5f4wggRHTt Xnf5SRHD+WLavwIr2HYxRd2D+haX6skaN2gmjQ3EhxNg+rGJ4ZfgpynHu3TmArqF6bXS ytQQ== X-Forwarded-Encrypted: i=1; AJvYcCXP0+41fWq/bI+LXpAfHgOpIDC3nlfc+kfkaYccx+5eigdhTwT2DIjwm6F0XshkcwbpfY7X+r+b5ZY=@lists.php.net X-Gm-Message-State: AOJu0YwozaKvjVFdKddjsixNhT3fDbLl2go0LokPRthLwJgoMLCcB6SB AhqQ8XhJB2NWLBlvNqDeHNX+bXySp90REjLEeocqegzRNliD7vaIKcOB0Zs94CQ/+37eX58g8gz zWSpBX4TWjEM+F2Q2Fd6m/7u1H2WB0G+7eLWuqbmgWgu+2alQE3hx X-Gm-Gg: ASbGnctu9OSNrBbbXJAfmzcLKulKubcvLCJrJb9QpdA1RtZv8j/ZCzmZKl7dC9kWvA7 ccyj++ayGQ0D4RsULzP6EVGFzk5iIIobkAQ2jDeCdyhiXJn+KSHakYz5NHJ51vM1gof1omFnCii Q= X-Google-Smtp-Source: AGHT+IFJxNnuxw9LnXSqW9tUcPDuG46sQ/DrlZPQfprl3SGLcanzf6NXrTkv4i0WwmxecqVZpburiuEX3x187ADm6yc= X-Received: by 2002:a05:622a:5819:b0:467:58a4:ef68 with SMTP id d75a77b69052e-46fd0acd510mr116717021cf.24.1738261027188; Thu, 30 Jan 2025 10:17:07 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <3624b46b-16f2-4eb3-b1ac-d0439cd79153@app.fastmail.com> In-Reply-To: <3624b46b-16f2-4eb3-b1ac-d0439cd79153@app.fastmail.com> Date: Thu, 30 Jan 2025 12:16:35 -0600 X-Gm-Features: AWEUYZkh2_qaUgSR6BYPPvIuikME3zzjVK3MUBZKQNO2XCF1vpis07JMFrrN18A Message-ID: Subject: Re: [PHP-DEV] [RFC] Introducing pm.max_memory for PHP-FPM To: Rob Landers Cc: Jakub Zelenka , internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000000d8381062cf06fe1" From: eth@ethaniel.com (Arkadiy Kulev) --0000000000000d8381062cf06fe1 Content-Type: text/plain; charset="UTF-8" > > To be honest, I haven't seen a 'slow' memory leak in a long time -- except > when using fgetcsv which has had a reported memory leak since ~2012 > somewhere on the old bug tracker. (I lost the link to it and don't even > remember how to get to the tracker or if it still exists.) I haven't > checked if it has been fixed since 8.2, but I've seen a couple of reports > of it on r/php a couple of times in the last couple of years. > A significant number of production environments still run PHP 7.4. Also, beyond the standard extensions, many installations rely on third-party or custom C extensions for specialized tasks (e.g., image processing, machine learning, or connections to external systems). Even a small bug in those C bindings can cause slow leaks that accumulate over multiple requests. In these cases, a process-level memory limit (checked after each request) can help avoid excessive memory growth without waiting on a fix or implementing a complicated workaround. Though it might be rare in core PHP these days, the fact that such issues can arise (especially in non-core extensions) is one of the main reasons some users might like a pm.max_memory mechanism. --0000000000000d8381062cf06fe1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To be honest, I haven't seen a 'slow' memory leak in a= long time -- except when using fgetcsv which has had a reported memory lea= k since ~2012 somewhere on the old bug tracker. (I lost the link to it and = don't even remember how to get to the tracker or if it still exists.) I= haven't checked if it has been fixed since 8.2, but I've seen a co= uple of reports of it on r/php a couple of times in the last couple of year= s.

A significant number of prod= uction environments still run PHP 7.4. Also, beyond the standard extensions= , many installations rely on third-party or custom C extensions for special= ized tasks (e.g., image processing, machine learning, or connections to ext= ernal systems). Even a small bug in those C bindings can cause slow leaks t= hat accumulate over multiple requests. In these cases, a process-level memo= ry limit (checked after each request) can help avoid excessive memory growt= h without waiting on a fix or implementing a complicated workaround. Though= it might be rare in core PHP these days, the fact that such issues can ari= se (especially in non-core extensions) is one of the main reasons some user= s might like a pm.max_memory mechanism.

--0000000000000d8381062cf06fe1--