Installed memcached via homebrew, how to start and stop server?
Brew used to have a command brew services (https://thoughtbot.com/blog/starting-and-stopping-background-services-with-homebrew), now deprecated. Instead, to get always-correct advice, run this command:
brew info memcached
Via telnet:
telnet localhost 11211
See also What are some useful tips/tools for monitoring/tuning memcached health?
brew remove memcached
How do I start memcached in the foreground with homebrew?
Nevermind I figured it out. I'll post the answer now since I couldn't find it elsewhere.
brew info memcached
In the output look for something like:
Or, if you don't want/need a background service you can just run:
/usr/local/opt/memcached/bin/memcached
Now just add this to your foreman procfile:
memcached: /usr/local/opt/memcached/bin/memcached -vv
Don't forget to add the -vv
flag.
Thanks to this post for the help https://devnullity.wordpress.com/tag/memcached/
gem install memcached is failed on Lion
do this:
ls -l /usr/local/include/memcached
lrwxr-xr-x 1 root staff 43 Jul 18 14:17 /usr/local/include/memcached -> ../Cellar/memcached/1.4.5/include/memcached
you need to remove that old link first:
sudo rm /usr/local/include/memcached
then try the brew link memcached
again
You probably also want to do this:
Installed memcached via homebrew, how to start and stop server?
Kony - How to restart a memcached server
If you server running in Linux server use following comment
%KMAP_SERVER_HOME%\memcached\memcached -p 21201
if your server in windows
double click %KMAP_SERVER_HOME%\memcached\memcached.exe
Please make sure that your middle ware is memcache enabled.
to check your memcache status use following Linux comment
echo status | nc 21201
Can rails server also start memcache if it isn't started?
You could make that script do lots of things, but that doesn't mean it's a good idea to do so. You should use a tool designed for the job of keeping processes up, like god or monit.
On a development box, I still probably wouldn't hack my rails script, but would instead write a shell script that does both things for me.
Edit: Responding to the comments below.
Alright, here's the simplest possible shell script. You can store it anywhere (like /usr/local/bin
), but you need to be in a RAILS_ROOT directory to run it.
dev_servers.sh
#!/bin/bash
memcached -d
rails server
Check if memcached is installed?
Aha! Your issue is not with your installation of memcached
. Keep in mind that memcache
and memcached
are two different caching mechanisms.
You'll want to make sure that your server has memcache
or apc
installed for WURFL to be able to cache properly.
How to enable fire and forget mode in moxi
Memcached has quiet commands, but I don't think they are implemented very frequently by SDK's (except for use in multi-get/set operations). These are likely what you need to use in order to enable this behavior. It is not a moxi setting, but a set of client commands that you would use.
Binary quiet commands (They end with a Q for quiet)
https://github.com/memcached/memcached/blob/master/protocol_binary.h#L98
Related Topics
Find a Unique Element in a Compound Array
How to Create This File Input and Output Assignment in Ruby
Create a Ruby Method That Accepts a Hash of Parameters
Rails Byebug Did Not Stop Application
Download All Gems Dependencies
Shoulda/Rspec Matchers - Conditional Validation
Where to Place Private Methods in Ruby
Programming a Simple Irc (Internet-Relay-Chat) Client
How to Turn on SQL Debug Logging for Activerecord in Rspec Tests
Rails in Rendering Unnecessary Information
Login Session Data Not Persisting in Rails 6
Passing Hashes Instead of Method Parameters
Ruby: How to Process a CSV File with "Bad Commas"
Ruby on Rails - Helper Method - Undefined Method 'Log_In' in Ruby on Rails