This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15212|Reply: 0

[Memcached] Memcached for Windows modifies ports and maximum memory

[Copy link]
Posted on 7/14/2016 10:43:22 AM | | | |
To use Memcached in Windows, you must first download Memcached for Win32 installation.

Download address: http://jehiah.cz/projects/memcached-win32/

After unzipping, just enter the following command c:memcachedmemcached.exe -d install in the command window to install memcached as a Windows service.

After starting the service, the memcached service occupies 11211 port by default, and the maximum memory occupied by default is 64M.

I encountered some problems when modifying these two configuration options, and I searched a lot of information on the Internet, and they all said that I could start the service with the following command:

c:memcachedmemcached.exe -p 12345 -m 1024 -d start, -p indicates the port to be modified, and -m indicates the maximum memory occupied (in M).

But no matter how I called this command, I found that the port was still 11211.

When I opened the Windows Service Control Panel, I found that the server startup parameters installed by default memcached.exe did not write -p -m parameters at all, only 1 -d runservice parameter.
So no matter what command you use to start the service, it's useless, see the figure below:


So I thought of directly modifying the startup parameters of the Windows service, the operation is as follows, open the registry, and find:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesmemcached Server
The value of the ImagePath item is: "c:memcachedmemcached.exe" -d runservice
Changed to "c:memcachedmemcached.exe" -p 12345 -m 128 -d runservice
After saving, restart the memcached service, and then type netstat -n -a in the command line to see if the port has been changed now. ^_^




win8 64-bit operating system registry HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\memcached   
Other system self-tests!





Previous:Windows below Memcached basic operation commands
Next:Type 'xx' in Assembly 'xx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=n...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com