php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58261 persistent connections with binary protocol?
Submitted: 2008-07-02 10:01 UTC Modified: 2008-07-03 07:36 UTC
From: jason at cubedthree dot com Assigned:
Status: Duplicate Package: memcache (PECL)
PHP Version: 5_2 CVS-2008-07-02 (dev) OS: linux (gentoo)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jason at cubedthree dot com
New email:
PHP Version: OS:

 

 [2008-07-02 10:01 UTC] jason at cubedthree dot com
Description:
------------
I'm not sure if this is the intended mode of operation, but when switching from ascii to binary protocol in 3.0.1, I noticed that memcache no longer uses persistent connections.  Switching back to ascii protocol verifies this.  I'm not using sessions through memcache (if that matters).

Reproduce code:
---------------
--- cache_lib.php ---
$CACHE_HANDLE = new Memcache;
$CACHE_HANDLE->addServer('10.8.147.2', 11211);
$CACHE_HANDLE->addServer('10.8.147.3', 11211);


--- memcache.ini ---
;memcache.protocol=ascii
memcache.protocol=binary
---


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-03 04:19 UTC] jason at cubedthree dot com
Doing a little more with this, I've found that using against Memcached 1.3.0, when configuring Memcached with -vv flag, I notice the following:

---
<25 new auto-negotiating client connection
Negotiating protocol for a new connection
Negotiated protocol as ascii.
<26 new auto-negotiating client connection
Negotiating protocol for a new connection
Negotiated protocol as ascii.
<27 new auto-negotiating client connection
Negotiating protocol for a new connection
Negotiated protocol as ascii.
<25 connection closed.
<26 connection closed.
<25 new auto-negotiating client connection
Negotiating protocol for a new connection
Negotiated protocol as ascii.
<26 new auto-negotiating client connection
Negotiating protocol for a new connection
Negotiated protocol as ascii.
<27 connection closed.
---

So, it appears as though the protocol isn't being auto-negotiated corrected.  If you need additional information, please let me know.  Thanks.
 [2008-07-03 07:36 UTC] mikael at synd dot info
This is a duplicate of Bug #13592

The binary protocol implementation in version 3.0.1 isn't compatible with the latest memcached release, if you check out and build pecl/memcache from CVS the protocol implementation has been updated to match.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 10:01:29 2025 UTC