Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128439 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 lists.php.net (Postfix) with ESMTPS id CE9011A00BC for ; Fri, 8 Aug 2025 16:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1754670624; bh=CU6unYFvXay1Kh87pnYBfSXB6Kmf0bLAXz5yCLmqllA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mtRg20Q7P64W+hcsdvPlpPkgUYppVr5zgIh2u1zb9fHyr4bxTtbhIfV8rHP0ubm0X ApcCJ0G1kqlbQZMflgNZy4GY/MtxsRg3PrcqDGhn4TSWSb7Wlw5lPOFCZfe6ldJYCZ HtWxavnEfprI/a15WlJjDl7ogXx5CfyDn35znT5fF0wy4KODC0/Gya+LVt6nZ5PE4A lwMBqo1Y2GGZ0Oilc7Y/FOIDx9biNMxAmU3PFHHXDfzdSgQad/LxW5v4fRVuy/Zt9p phQprjnw3Dx/7pKUE9fjvp9qDl5vuujzxg0pXx8ozXTODp3IEq/u4IaT41bqWapwq2 z97QiFAoN+2YA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C195218004D for ; Fri, 8 Aug 2025 16:30:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,THIS_AD autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 ; Fri, 8 Aug 2025 16:30:23 +0000 (UTC) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-af949bdf36cso416425566b.0 for ; Fri, 08 Aug 2025 09:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754670721; x=1755275521; 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=CU6unYFvXay1Kh87pnYBfSXB6Kmf0bLAXz5yCLmqllA=; b=C5y+xOWYP+y3AJIJQnsrG7334FppJIeRC1ATBvb4FSEwAVsF30HrGlnDXTLAttTeIo EElZVjL3vj6cFvi84dAEqSbS1FpLh5hhIxH+NVxspk6o+p/5n26hB1LGbUjNf4HqeUmh qEnOi90CnwPTDVrED7HTYyEnXvxHVnhHLohWVO2PaVPUKALoDHNR+ht7oJDut6rGvEVQ CWqRMSXRVUcJOKuxXop2lFljaqzjUnrzPfR5rvm+9H2DLIj0HvJ45IPOu/GtE0CpUN1m vWeU21c8V+SANX8wB63hwfi+YipkMtd8L9XQOTYLPgXYdk1XylupDmnfW41MWQBaZpKu q4Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754670721; x=1755275521; 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=CU6unYFvXay1Kh87pnYBfSXB6Kmf0bLAXz5yCLmqllA=; b=QJNAXaQ7Uzsl/tqWQnfFdrFCwcZLQGCG/UbkK+oTuS6GyS1tlxVIx/j4fqPyx4ncOj 1GQwyREuPKHJMkjljXDQt8lNkbp92Eodxos5AfLKusfwpHWQSVaAiC4fQO9lR/LqZ8SQ 5aykbk3BwLOIrZ/G9/ilDbnNJmgtpOr//6SLiZd8Ffd+am/sAXPcpJ5Z8oz6jKwnsONr fqFhFOOPv5PsBxGT7hhbNYQwYdTJK4aDwqKFiVk/uF1+fFgRdPC/45BbzGmnaAiyqnVs w3v5coz08qKWAAPlwZGVk9GrtRM95tH+VE9+ht011r2hNRScrOj16D9ooDmjYPnjPvSr FL+A== X-Gm-Message-State: AOJu0Yz6X2k58E6ai6xNlWi0wNAzBJzDPdng4fXN+Vl48Y6QTAARR/Tn 5S3g5Flf0VuQpL1Rg8QyfqFB9VJ9hmsiVevw/KwRPzXcdZj+rMBLB+vkg86NN74jq1U8+f+2f/F A2tzE07X0RJQBCIKm0YT77UxZxki7q50MnD/N X-Gm-Gg: ASbGncvqjrjz3BezL/ZVhI2NVUK+d4473n9i2396mMOLZzeeyXazNUeCxb8ZPe/7hmt JYOIvWaVu8tBGCDFg9AGK9eMN9fxtPg8+7BJalnqTIb7gE98jdPOwKAYquhZVyCoIondw86g7/6 PgERQDolC2w+WEcUJHnI1G1T/+vqjvkexxs0Ll5lJbIJhtOlUg3enYy9nQSo0S/ZER+3viC7s+J YyGmw== X-Google-Smtp-Source: AGHT+IF297VGrP3nwct/dxKPfjmHaCLWeX4GoLP154VEV/mXWcYzRzqXpEI1cUgCDGmzM+6QmDchxnPFlMvQOkGG8r8= X-Received: by 2002:a17:907:86a9:b0:af9:81d0:d971 with SMTP id a640c23a62f3a-af9c65387eemr315137866b.50.1754670720600; Fri, 08 Aug 2025 09:32:00 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 8 Aug 2025 12:31:49 -0400 X-Gm-Features: Ac12FXzUzpk-0ahNtyPOZT6ILu9Hqi9h860_VTLbv8MNfUL6dVtVgHwfE9sOzCg Message-ID: Subject: Re: [PHP-DEV] PDO Disconnect and Persistent Connect To: Kamil Tekiela Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000ffd4f4063bdd1c13" From: rposky@gmail.com (Robert Wolf) --000000000000ffd4f4063bdd1c13 Content-Type: text/plain; charset="UTF-8" > > Persistent connection helps avoid the overhead involved in creating and > authorizing a new connection on the server. > That only applies if you are creating multiple PDO objects and expecting re-use of the kept-alive underlying connection, correct? If persistent connections were removed, it is true that any users utilizing PDO in this ad-hoc fashion and expecting connection keepalive would be impacted. Granted, that potential impact may not be tenable, but the workaround would seem rather straightforward to communicate to users and to implement - that workaround being for the user to introduce a PDO singleton to hold the object reference as long as you wish the connection to live for. > --000000000000ffd4f4063bdd1c13 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Persistent connection helps avoid the overhea= d involved in creating and authorizing a new connection on the server.
<= /blockquote>

That only applies if you are creatin= g multiple PDO objects and expecting re-use of the kept-alive underlying co= nnection, correct?

If persistent connections were = removed, it is true that any users utilizing PDO in this ad-hoc fashion and= expecting connection keepalive would be impacted. Granted, that potential = impact may not be tenable, but the workaround would seem rather straightfor= ward to communicate to users and to implement - that workaround being for t= he user to introduce a PDO singleton to hold the object reference as long a= s you wish the connection to live for.
--000000000000ffd4f4063bdd1c13--