LSMCD activated short time, after 30 mins Connection Test will be failed.(In LSCWP)

#1
Hi there,

I tried to use LSMCD for the object cache.
But it something wrong that after 30 mins Connection Test will be failed.

Here is the step list what I did.
1. Use CyberPanel then install OpenLiteSpeed for webpage server.
2. While install OpenLiteSpeed , also install Memcached Extension and Redis Extension .
3. According to some webpages, I should stop Memcached Extension first that prevent some problems.
Then I did:
Code:
systemctl stop memcached.service
systemctl disable memcached.service
※My Linux distributions is CentOS8

Then follow the install steps with "Compiling/Installing LSMCD"
1)
Code:
yum groupinstall "Development Tools"
yum install autoconf automake zlib-devel openssl-devel expat-devel pcre-devel libmemcached-devel cyrus-sasl*
2)
Code:
git clone https://github.com/litespeedtech/lsmcd.git
3)
Code:
cd lsmcd
./fixtimestamp.sh
./configure CFLAGS=" -O3" CXXFLAGS=" -O3"
make
4)
Code:
sudo make install
5) vi /usr/local/lsmcd/conf/node.conf
Code:
Repl.HeartBeatReq=30
Repl.HeartBeatRetry=3000
Repl.MaxTidPacket=2048000
Repl.GzipStream=YES
Repl.LbAddrs=127.0.0.1:12340
Repl.ListenSvrAddr=127.0.0.1:12340
REPL.DispatchAddr=127.0.0.1:5501
RepldSockPath=/tmp/repld.usock
CACHED.PRIADDR=127.0.0.1:11000

CACHED.ADDR=127.0.0.1:11211
#CACHED.ADDR=UDS:///tmp/lsmcd.sock
#default is 8, it can be bigger depending on cache data amount
Cached.Slices=8
Cached.Slice.Priority.0=100
Cached.Slice.Priority.1=100
Cached.Slice.Priority.2=100
Cached.Slice.Priority.3=100
Cached.Slice.Priority.4=100
Cached.Slice.Priority.5=100
Cached.Slice.Priority.6=100
Cached.Slice.Priority.7=100

Cached.ShmDir=/dev/shm/lsmcd
Cached.UseSasl=false
Cached.DataByUser=true
Cached.Anonymous=true
#Cached.SaslDB=/etc/sasllsmcd

##this is the global setting, no need to have per slice configuration.
User=nobody
Group=nobody
#depends CPU core
CachedProcCnt=1
CachedSockPath=/tmp/cached.usock.
TmpDir=/tmp/lsmcd
LogLevel=notice
#LogLevel=dbg_medium
LogFile=/tmp/lsmcd.log
6) Check activated or not
Code:
systemctl status lsmcd
7)
Code:
lsmcd.service - LSB: lsmcd
Loaded: loaded (/etc/rc.d/init.d/lsmcd; generated)
Active: active (running) since Sun 2021-06-27 07:57:00 UTC; 3h 44min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 3 (limit: 5794)
Memory: 5.3M
CGroup: /system.slice/lsmcd.service
         ├─1273 /usr/local/lsmcd/bin/lsmcd -f /usr/local/lsmcd/conf/node.conf
         ├─1280 /usr/local/lsmcd/bin/lsmcd
         └─2736 /usr/local/lsmcd/bin/lsmcd

Jun 27 07:56:58 hwsrv-888106.hostwindsdns.com systemd[1]: Starting LSB: lsmcd...
Jun 27 07:57:00 hwsrv-888106.hostwindsdns.com lsmcd[1231]: start lsmcd         >
Jun 27 07:57:00 hwsrv-888106.hostwindsdns.com systemd[1]: Started LSB: lsmcd.
8) Input
Code:
telnet 127.0.0.1 11211
Code:
stats
The right message should be like
Code:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
stats
STAT pid 1300
STAT version 1.0.0
STAT pointer_size 64
STAT rusage_user 0.024294
STAT rusage_system 0.053357
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
END
But after 30~1hour
The message will be
Code:
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection timed out
And the CPU usage will raise to almost 100%(You can check the attachment)
Keep-CPUHigh-Usage.png
9) Check LSMCD version
Code:
/usr/local/lsmcd/bin/lsmcd -v
lsmcd server 1.4.24
That's all.

Did I missed something?
Actually, at the beginning it worked! But after 30 mins, the Connection Test become failed and load pages be very heavy.
I'd like to use OpenLiteSpeed (or LiteSpeed)+LiteSpeed Cache+LSMCD(For Object Cache )
Could someone help me to solve this problem? (Or maybe it's a bug?)
 
#2
This definitely looks like a bug as I don't see anything wrong. If you can give me access to your system, I can take a look at it directly. Our jump server's IP address is 35.161.131.175 and if you can give that machine access to your system I can look for crashes, do a debug build, or whatever is necessary. If you can't allow access into your system, there are now instructions about building an Address Sanitizer version which causes the log to report any crash information in detail: https://docs.litespeedtech.com/prod...oting/#compiling-a-debug-or-sanitized-version

Thanks,

Bob Perper
 
#3
This definitely looks like a bug as I don't see anything wrong. If you can give me access to your system, I can take a look at it directly. Our jump server's IP address is 35.161.131.175 and if you can give that machine access to your system I can look for crashes, do a debug build, or whatever is necessary. If you can't allow access into your system, there are now instructions about building an Address Sanitizer version which causes the log to report any crash information in detail: https://docs.litespeedtech.com/prod...oting/#compiling-a-debug-or-sanitized-version

Thanks,

Bob Perper
Hi, I would like to give you access to my system.
But I don't know what should I do first.(Sorry, I'm just a noob)
 
#5
I would need to login using ssh. You'd need to open up your firewall to my IP address. I'm afraid I can't give you much help on that.

If you can't get help doing that, then build the Address Sanitizer version described here and then send me the /tmp/lsmcd.log file: https://docs.litespeedtech.com/prod...oting/#compiling-a-debug-or-sanitized-version

Thanks,
Bob
Hi, I'll try to open my firewall to your jump address 35.161.131.175.
Should I create another SSH account for you?
Another question is what the port should open it for you?(My SSH port or just another port for you?)
And should I switch the Object cache to Memcached (For now is Redis).

Thank you
 
#6
It would make my life a lot easier if you could get me root access - most customers do that. Don't care about the port, just let me know which one to use. Yes, please set the object cache to memcached. Actually if you could give my browser (on IP address 100.8.106.82) access to your wordpress system with admin rights that would help a lot. Thanks!

Bob
 
#7
I open the firewall with 2 rules.
For jump server : 35.161.131.175 . Port 59408(But I have to create new account with root access, I'm not sure I could do well)
For your web browser:100.8.106.82 . Port 59408
Already opened.

Or here is tempray account that you can login in to my wordpress system.
username: admin
password: MmYyqRky3Vfab8D&B@*d
 
#10
Actually for root access, here's my public key:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcIwEzYeg88iqXFFsgp6z2NqxlgO2RP5dmtFOsJCrf6JTfMm5hDL/BYXNXSA0fhx1hFBkA6TPe9dxwb/8yN7H66pB2I/rSwY5eczthrrSZrZkOHndksmJNsGYYAWDMv01anvkFfp7pkQL2cB9TL5G6WKOYTQ+XA1u4TNaAeh+4b+OwNFXkxzpWNtmEtz1hqpciQSnzIXfBrfYJkomiNZvBGy6ZFsOyxXCi5XJTOIaaWrxmV/38wM/FvbyQW603HuJyvJjoLJECrHuZjX4UKY89b7HCeYTMVS1v8CFQkPSN8MvTgOyYFPiv/4yOO/A8dHgwamDGGNrj4qf7jpYPzSNZ globalsupport@litespeedtech
 
#11
Hi, I just mail to you
Actually for root access, here's my public key:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcIwEzYeg88iqXFFsgp6z2NqxlgO2RP5dmtFOsJCrf6JTfMm5hDL/BYXNXSA0fhx1hFBkA6TPe9dxwb/8yN7H66pB2I/rSwY5eczthrrSZrZkOHndksmJNsGYYAWDMv01anvkFfp7pkQL2cB9TL5G6WKOYTQ+XA1u4TNaAeh+4b+OwNFXkxzpWNtmEtz1hqpciQSnzIXfBrfYJkomiNZvBGy6ZFsOyxXCi5XJTOIaaWrxmV/38wM/FvbyQW603HuJyvJjoLJECrHuZjX4UKY89b7HCeYTMVS1v8CFQkPSN8MvTgOyYFPiv/4yOO/A8dHgwamDGGNrj4qf7jpYPzSNZ globalsupport@litespeedtech
Hello, I just add your public key.
Just in case,
username: user
password: MmYyqRky3Vfab8D&B@*d
 
#16
Hi there,
I think the problem should related with LiteSpeed Cache.
In my WordPress plugin, I also installed Clearfy for disable some unnecessary js and css
It also have clean cache function.
When I choose Clearfy clear cache function, and the function done.
The webpage become normal.(But the CPU usage still in high usage)
 
Top