Comments (10)
I tried to clear the cache with command:
echo -ne "flush_all\r\n" | nc 0 5000
SERVER_ERROR Command not supported
But get an error.
Also, my php app can't reset cache via memcache: http://php.net/manual/en/memcache.flush.php
php_app (do action reset_cache)
|
| -- php_method (Memcache::flush ( mcrouter.local:5001 ))
|
| -- part of syslog error: [2015-02-16 13:40:18] project.ERROR: could not connect to memcache {"host":"mcrouter.local","port":5001.....
Can you provide information about rules "how to flush_all/flush_regex via mcrouter", please?
I see of your code:
[mc_op_flushall] = 22 /* flush_all \r\n /,
[mc_op_flushre] = 14 / flush_regex \r\n /,
[mc_op_stats] = 8 / stats \r\n */,
Why some of commands works fine (e.g. stats) but some of those doesn't work?
from mcrouter.
@0xd3adsh3ll thanks for the report. We explicitly disabled flush_all and flush_regex commands, because it may be very destructive to replicate them via mcrouter (it is very easy to break everything if some broken script sends those commands to production boxes). See https://github.com/facebook/mcrouter/blob/master/mcrouter/McrouterClient.cpp#L33
What is your use case? If it is only for debugging/testing, we can add the support, but guard it with some command line option (like --enable-flush-command or --debug-mode).
from mcrouter.
Hello, @pavlo-fb,
Memcache::flush needs for new releases of our projects:
ansible
|
|-- production_servers (remove old code, create new release folder, prepare env)
|-- control_panel (clear all cached data after release because we stored some temporary settings in cache which must be removed.)
I have question, if send flush_all directly on memcached servers bypassing mcrouter? It's possible?
Thanks.
|--
from mcrouter.
Yes, mcrouter doens't modify the behavior of memcached at all, so if you
send a flush all command directly to the memcached server, it will behave
normally.
On Tue, Feb 17, 2015 at 10:10 PM, 0xd3adsh3ll [email protected]
wrote:
Hello, @pavlo-fb https://github.com/pavlo-fb,
Memcache::flush needs for new releases of our projects:ansible
|
|-- production_servers (remove old code, create new release folder,
prepare env)
|-- control_panel (clear all cached data after release because we stored
some temporary settings in cache which must be removed.)I have question, if send flush_all directly on memcached servers bypassing
mcrouter? It's possible?
Thanks.|--
—
Reply to this email directly or view it on GitHub
#29 (comment).
from mcrouter.
@ryanmce, thanks!
If @pavlo-fb can enable: "If it is only for debugging/testing, we can add the support, but guard it with some command line option (like --enable-flush-command or --debug-mode)" It's be a perfectly.
from mcrouter.
Hello, @pavlo-fb, @ryanmce tell me please, you can enable "--enable-flush-command"?
Thanks.
from mcrouter.
Hello @0xd3adsh3ll,
As @pavlo-fb said, these commands are very dangerous to be replicated via mcrouter. You should consider bypassing mcrouter for these specific statements and sending it straight to the memcached box you intend too.
That being said, if you really think you need/want to use these commands with mcrouter, let me know and I will re-prioritize and get this done for you sooner rather than later.
Thanks.
from mcrouter.
Hello @andreazevedo,
Thanks for your reply, I understand the risk but could you please enable "flush_all" via mcrouter, this need for our project.
Thanks.
from mcrouter.
Hello @0xd3adsh3ll,
We just pushed a new version of mcrouter that adds support to flush_all
(commit 3cb8ca2). You just need to specify the --enable-flush-cmd
command-line option.
from mcrouter.
Hello @andreazevedo,
Thanks a lot :)
I'm close this ticket. You are awesome! :)
from mcrouter.
Related Issues (20)
- Slow performance - Redis benchmark test HOT 1
- “Stats files” wiki page has some formatting issues HOT 1
- Simple replication model not working as expected HOT 1
- `mg` for WarmupRoute?
- CentOS 8 RPM/Build Support HOT 1
- Cannot build ubuntu20 docker file HOT 5
- Memcached server specification (TLS/SSL) documentation HOT 1
- Error to build docker image with docker file... HOT 1
- Last stable version
- Warmup related configuration incase we are running mcrouter and memcache on kubernetes
- Mcrouter adds MC_MSG_FLAG_BIG_VALUE flag but never removes it HOT 4
- AsyncSocketException: AsyncMcClient, type = Socket not open HOT 1
- unable to build new py3 thrift changes in upstream
- ubuntu 20.04 building issue HOT 1
- Failed to build on Ubuntu 22.04 HOT 1
- Addition of a pre-populated replica
- New Ubuntu package HOT 2
- Failed to build on ubuntu18.04
- How can I traverse a server in the pool? HOT 1
- Issues after memcached version upgrade
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 mcrouter.