Comments (8)
@xqpmjh I am assuming that you are using the config file https://github.com/twitter/twemproxy/blob/master/conf/nutcracker.yml
in this file, the pool listening on "127.0.0.1:22121" is a redis pool and hence only parses redis requests and responses
you either want to delete the line "redis: true" or use "redis:false"
from twemproxy.
your problem may also be the following: http://stackoverflow.com/questions/4745345/how-do-i-stop-phpmemcachedelete-from-producing-a-client-error
from spec: https://github.com/memcached/memcached/blob/master/doc/protocol.txt, delete format is 'delete [noreply]'
but it seems like php delete sends 'delete timeout [noreply]"
from twemproxy.
Thank you so much manjuraj~
But neithor delete(key, 0) nor upgrade the twemproxy could make it works.
Here is what I got from the log when PHP's memcache sending the 'delete' command to twemproxy :
[Thu Dec 6 15:23:45 2012] nc_proxy.c:207 p 7 listening on '127.0.0.1:22121' in memcache pool 0 'leaf' with 9 servers
[Thu Dec 6 15:24:56 2012] nc_proxy.c:337 accepted c 8 on p 7 from '127.0.0.1:41348'
[Thu Dec 6 15:24:56 2012] nc_core.c:207 close c 8 '127.0.0.1:41348' on event 0001 eof 0 done 0 rb 72 sb 48: Invalid argument
[Thu Dec 6 15:25:09 2012] nc_proxy.c:337 accepted c 8 on p 7 from '127.0.0.1:41393'
[Thu Dec 6 15:25:09 2012] nc_core.c:207 close c 8 '127.0.0.1:41393' on event 0001 eof 0 done 0 rb 72 sb 48: Invalid argument
It seems that twemproxy doesn't accept the command? But doesn't it just pass the commands to the group backend?
from twemproxy.
Guys, for those of you, who have problems with deletion through PHP memcache extension, there is a patch for twemproxy in my fork: yugene@b965652
from twemproxy.
This isn't part of the memcache spec and the PHP manual even says "It's not recommended to use the timeout parameter. The behavior differs between memcached versions, but setting to 0 is safe. Other values for this deprecated feature may cause the memcache delete to fail."
Doesn't seem like this should be part of master.
from twemproxy.
Agree, this should not be in the master.
Php extension manual is a bit misleading. You may set the timeout parameter to 0 or not use it at all, but it will appear in request to memcache (at least, in latest stable).
from twemproxy.
In fact, finally I fixed it by removing the "time" parameter of delete() within the source code of memcache(php) extension then recompile.
command_len = spprintf(&command, 0, "delete %s %d", key, time);
command[command_len] = '\0';
->
command_len = spprintf(&command, 0, "delete %s", key);
from twemproxy.
@yugene , so if i don't use your patch, there's no way i can send delete command from PHP to twemproxy ?
from twemproxy.
Related Issues (20)
- Cross Region Replication Support HOT 1
- Monotonically Increasing CPU usage for redis proxy HOT 3
- Twemproxy does not release memory for mbufs: Free list garbage collection approach HOT 1
- Not working redis-sentinel-feature HOT 2
- Building release 0.5.0 on OpenBSD 7.0 fails with `ld: error: undefined symbol: backtrace` HOT 1
- we have Redis Cluster ,what's twemproxy usage for Redis now?
- add HRANDFIELD HOT 5
- twemproxy支持blpop指令么? HOT 2
- Question: Can we pass/upload configuration file through web browser?
- error logs: NC_ request HOT 2
- possible bug in slots count reported in verbose logging statement HOT 1
- Q: still copy after each msg_parsed?? HOT 1
- memcached replication (with consistant hash) HOT 2
- Do not ship/install "test_all"
- Murmur implementation is not endian/alignment-neutral
- Getting error "" Redis connection lost and commands aborted in uncertain state. They might have been processed."'
- nutcracker sets umask only upon daemonization HOT 1
- fuzzing integration in oss-fuzz HOT 1
- 这个工具支持 redis 双向实时同步吗? HOT 1
- How to open HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twemproxy.