Comments (39)
I'm going to pass this over to Abe who should be able to help you on the PHP, WP Cache side.
from lsmcd.
If lsmcd still has an active pid, then the connection failure is something else. What you should do is open a ticket through LiteSpeed on that and we can better help you that way.
from lsmcd.
Yes, thanks so much. I think when the issue happen (after 2-3 hours later), I will update info here first, if can not find solution I will open a tickets in Litespeed Enterprise account.
from lsmcd.
Hi,
I'm a developer for the LSMCD product. I'll need to see your /tmp/lsmcd.log file. We're going to want to make sure that you're running the latest version as well. The version number is written to the /tmp/lsmcd.log file and the current version is 1.4.30. If you're not running that version, first upgrade as a number of crashes have been addressed.
Thanks,
Bob Perper
from lsmcd.
hello @rperper
thanks
please see partial output from cat /tmp/lsmcd.log
2022-03-01 20:33:10.062 [NOTICE] [PID: 619] [SASL] Password verification failed
2022-03-01 20:33:10.062 [ERROR] [PID: 619] SASL Error in sasl_server_start: authentication failure
2022-03-01 20:33:10.063 [NOTICE] [PID: 616] [SASL] Password verification failed
2022-03-01 20:33:10.063 [ERROR] [PID: 616] SASL Error in sasl_server_start: authentication failure
2022-03-01 20:33:58.591 [NOTICE] [PID: 617] [SASL] Password verification failed
2022-03-01 20:33:58.591 [ERROR] [PID: 617] SASL Error in sasl_server_start: authentication failure
2022-03-01 20:33:58.592 [NOTICE] [PID: 618] [SASL] Password verification failed
2022-03-01 20:33:58.592 [ERROR] [PID: 618] SASL Error in sasl_server_start: authentication failure
2022-03-01 20:33:58.593 [NOTICE] [PID: 616] [SASL] Password verification failed
2022-03-01 20:33:58.593 [ERROR] [PID: 616] SASL Error in sasl_server_start: authentication failure
2022-03-02 06:41:34.343 [NOTICE] [PID: 617] [PID: 617] During iterator test, noted shared memory may be damaged. Rebuilding
2022-03-02 06:41:34.344 [NOTICE] [PID: 595] Deleting the shared memory database
2022-03-02 06:41:34.345 [NOTICE] [PID: 595] [PID: 595] Doing a restart upon USR1
2022-03-02 06:41:34.347 [NOTICE] [PID: 618] [PID: 618] During iterator test, noted shared memory may be damaged. Rebuilding
2022-03-02 06:41:36.368 [NOTICE] [PID: 595] LSMCD/1.4.30 LiteSpeed Memcached Replacement
2022-03-02 11:36:12.869 [NOTICE] [PID: 6017] LSMCD/1.4.30 LiteSpeed Memcached Replacement
2022-03-02 11:36:12.871 [WARN] [PID: 6020] SHM file [/dev/shm/lsmcd/data3.shm] size: 8601600, does not match x_stat.m_iFileSize: 8192, correct it
2022-03-02 22:28:50.089 [NOTICE] [PID: 6024] [PID: 6024] During iterator test, noted shared memory may be damaged. Rebuilding
2022-03-02 22:28:50.090 [NOTICE] [PID: 6020] Deleting the shared memory database
2022-03-02 22:28:50.091 [NOTICE] [PID: 6020] [PID: 6020] Doing a restart upon USR1
2022-03-02 22:28:50.097 [NOTICE] [PID: 6026] [PID: 6026] During iterator test, noted shared memory may be damaged. Rebuilding
2022-03-02 22:28:50.116 [NOTICE] [PID: 6020] LSMCD/1.4.30 LiteSpeed Memcached Replacement
2022-03-02 23:06:13.421 [NOTICE] [PID: 9929] LSMCD/1.4.30 LiteSpeed Memcached Replacement
2022-03-02 23:06:13.424 [WARN] [PID: 9931] SHM file [/dev/shm/lsmcd/data7.shm] size: 8601600, does not match x_stat.m_iFileSize: 8192, correct it
from lsmcd.
Ok, I see what's happening here. When LSMCD sees a problem in its database, it rebuilds it and restarts the application. This is hardly perfect behavior (lots of obnoxious messages), but it is normal and expected. You can ignore them unless you are seeing a failure in availability, and that does not appear to be happening here.
Thanks,
Bob
from lsmcd.
Hello and thanks
unfortunately it stops, but I have to manually issue a systemd restart of the service, otherwise it's not restarting itself
from lsmcd.
Hi,
The service may be down, but does the lsmcd program continue to run? It should be continuing to accept requests after that message.
You can force the condition by sending a USR1 signal to the process.
ps -ef|grep lsmcd
should give you the pid of the daemon process (plus a number of workers). If the pid is 6000, try:
kill -USR1 6000
I would expect the service to go down, and lsmcd to be restarted on a different pid, but to still be running. Thus:
ps -ef|grep lsmcd
would be expected to show a different set of pids, but LSMCD should still be servicing requests.
Let me know if that does what I expect or something else. If something else, then we'll need you to open a Litespeed ticket and we'll have to have root access to your system. Reference that you'd like Bob Perper assigned to the problem.
Thanks,
Bob
from lsmcd.
Hi,
I was able to reproduce it in my environment. It appears that systemd takes down the process if it comes up again in a separate pid.
The way I was able to keep it running after the USR1 signal was to add the following to the /etc/systemd/system/lsmcd.service file in the [Service] group:
RemainAfterExit=yes
This results in an obnoxious message in the systemd status, but it will not kill it after it's been restarted. You won't be able to use systemctl to determine if the task is up, but ps
will work satisfactorily. Please let us know if this works for you.
Thanks,
Bob
from lsmcd.
perfect, i'll let you know!
from lsmcd.
well it seems that i'm struggling with another problem now, i don't know if it's related to this
RemainAfterExit=yes
but as soon as I turn on memcached, from the Wordpress plugin (LiteSpeed Cache Settings -> Cache -> Object -> Turn on cache settings), almost every page loaded on my website, returns a PHP fatal error. I collected a trace from OpenListeSpeed web server log
[506] [192.168.250.253:3969-1#mydomain:lsapi] [STDERR] PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /usr/local/lsws/sites/mydomain/html/wp-includes/meta.php:657
Stack trace:
#0 /usr/local/lsws/sites/mydomain/html/wp-includes/meta.php(572): get_metadata_raw()
#1 /usr/local/lsws/sites/mydomain/html/wp-includes/post.php(2505): get_metadata()
#2 /usr/local/lsws/sites/mydomain/html/wp-content/plugins/elementor/core/documents-manager.php(210): get_post_meta()
#3 /usr/local/lsws/sites/mydomain/html/wp-content/plugins/elementor/core/files/css/post.php(195): Elementor\Core\Documents_Manager->get()
#4 /usr/local/lsws/sites/mydomain/html/wp-content/plugins/jet-theme-core/includes/locations.php(115): Elementor\Core\Files\CSS\Post->enqueue()
#5 /usr/local/lsws/sites/mydomain/html/wp-includes/class-wp-hook.php(307): Jet_Theme_Core_Locations->enqueue_styles()
#6 /usr/local/lsws/sites/mydomain/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#7 /usr/local/lsws/sites/mydomain/html/wp-includes/plugin.php(474): WP_Hook->do_action()
#8 /usr/local/lsws/sites/mydomain/html/wp-includes/script-loader.php(2105): do_action()
#9 /usr/local/lsws/sites/mydomain/html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts()
#10 /usr/local/lsws/sites/mydomain/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#11 /usr/local/lsws/sites/mydomain/html/wp-includes/plugin.php(474): WP_Hook->do_action()
#12 /usr/local/lsws/sites/mydomain/html/wp-includes/general-template.php(3042): do_action()
#13 /usr/local/lsws/sites/mydomain/html/wp-content/themes/monstroid2-child/header.php(19): wp_head()
#14 /usr/local/lsws/sites/mydomain/html/wp-includes/template.php(770): require_once('...')
#15 /usr/local/lsws/sites/mydomain/html/wp-includes/template.php(716): load_template()
#16 /usr/local/lsws/sites/mydomain/html/wp-includes/general-template.php(48): locate_template()
#17 /usr/local/lsws/sites/www.hwlegn
from lsmcd.
from lsmcd.
hello
unfortunately just tried many times, deleting cache and restarting the service
from lsmcd.
Can you put in the lsmcd.log so we can see if there are any issues there?
Thanks,
Bob
from lsmcd.
unfortunately not
2022-03-10 18:01:47.383 [NOTICE] [PID: 609] LSMCD/1.4.30 LiteSpeed Memcached Replacement
it's the only thing logged.
Edit: I switched back from PHP 8.1 to PHP 7.4. Same problem
from lsmcd.
Hi @Dark345
Please refer to this: https://docs.litespeedtech.com/lscache/lscwp/cache/#method
Look into the "LSMCD Warning" part.
from lsmcd.
hello, perfect.
what's the consequence of adding users and user_meta to do not cache group?
from lsmcd.
Hello @Dark345
As the option name "Do Not Cache Group" states, once the group is added into this textbox, items/objects under this cache group will not be cached into object cache.
About wp cache group, you can refer to this page: https://developer.wordpress.org/reference/classes/wp_object_cache/
from lsmcd.
@Dark345 Have you got the solution? I have the same issue, lsmcd keep on stopping without any error in lsmcd.log.
/usr/local/lsmcd/bin/lsmcdctrl start
I started and for a while, it stopped without showing any error in logs... I am using lsmcd with Litespeed Enterprise...
from lsmcd.
@Dark345 Have you got the solution? I have the same issue, lsmcd keep on stopping without any error in lsmcd.log.
/usr/local/lsmcd/bin/lsmcdctrl start
I started and for a while, it stopped without showing any error in logs... I am using lsmcd with Litespeed Enterprise...
Hello yes! solved by applying this suggested parameter.
It's indeed as described:
When LSMCD sees a problem in its database, it rebuilds it and restarts the application.
and
It appears that systemd takes down the process if it comes up again in a separate pid
from lsmcd.
So are you ok?
from lsmcd.
So are you ok?
yea, issue lsmcd systemd stops randomly is solved.
I mentioned another issue but it's workarounded by doing this
from lsmcd.
Funny you should mention that. We've been doing some preliminary testing that seems to address the WP Cache problem by installing the libmemcached-awesome library and completely replacing the existing libmemcached library with it. It seems to have fixed the problem. If you don't mind giving something like that a try, we have an early cheat-sheet of instructions for it. We'd love to hear your experiences with it. Check out: https://docs.google.com/document/d/1GNZ3EOcOeBqYS19rl5rnGoh8I9N1BFU3htSn_IPaavg/edit?usp=sharing
Thanks,
Bob
from lsmcd.
Funny you should mention that. We've been doing some preliminary testing that seems to address the WP Cache problem by installing the libmemcached-awesome library and completely replacing the existing libmemcached library with it. It seems to have fixed the problem. If you don't mind giving something like that a try, we have an early cheat-sheet of instructions for it. We'd love to hear your experiences with it. Check out: https://docs.google.com/document/d/1GNZ3EOcOeBqYS19rl5rnGoh8I9N1BFU3htSn_IPaavg/edit?usp=sharing Thanks,
Bob
Hey, is this to fix this?
If you are using LiteSpeed Memcached with [SASL](https://docs.litespeedtech.com/products/lsmcd/configuration/sasl/), please be aware there is a known issue which sometimes results in a fatal error like this:
PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /home/domainname/public_html/wp-includes/meta.php:588
from lsmcd.
Yes it is.
from lsmcd.
@Dark345 Have you got the solution? I have the same issue, lsmcd keep on stopping without any error in lsmcd.log.
/usr/local/lsmcd/bin/lsmcdctrl start
I started and for a while, it stopped without showing any error in logs... I am using lsmcd with Litespeed Enterprise...Hello yes! solved by applying this suggested parameter.
It's indeed as described:
When LSMCD sees a problem in its database, it rebuilds it and restarts the application.
and
It appears that systemd takes down the process if it comes up again in a separate pid
"RemainAfterExit=yes" is already existed in /etc/systemd/system/lsmcd.service...
Could you show the /etc/systemd/system/lsmcd.service content here?
from lsmcd.
@Dark345 Have you got the solution? I have the same issue, lsmcd keep on stopping without any error in lsmcd.log.
/usr/local/lsmcd/bin/lsmcdctrl start
I started and for a while, it stopped without showing any error in logs... I am using lsmcd with Litespeed Enterprise...Hello yes! solved by applying this suggested parameter.
It's indeed as described:
When LSMCD sees a problem in its database, it rebuilds it and restarts the application.
and
It appears that systemd takes down the process if it comes up again in a separate pid"RemainAfterExit=yes" is already existed in /etc/systemd/system/lsmcd.service... Could you show the /etc/systemd/system/lsmcd.service content here?
here you have:
[Unit]
Description = LiteSpeed LSMCD Daemon
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart = /usr/local/lsmcd/bin/lsmcdctrl start
ExecStop = /usr/local/lsmcd/bin/lsmcdctrl stop
#ExecReload= /usr/local/lsmcd/bin/lsmcdctrl restart
#Github suggested fix
RemainAfterExit=yes
KillMode=none
PrivateTmp=false
# do not want to be limited in anyway
CPUAccounting=false
TasksAccounting=false
MemoryAccounting=false
[Install]
WantedBy=default.target
from lsmcd.
My file: Latest version of lsmcd
`[Unit]
Description = LiteSpeed LSMCD Daemon
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart = /usr/local/lsmcd/bin/lsmcdctrl start
ExecStop = /usr/local/lsmcd/bin/lsmcdctrl stop
#ExecReload= /usr/local/lsmcd/bin/lsmcdctrl restart
KillMode=none
PrivateTmp=false
RemainAfterExit=yes
#do not want to be limited in anyway
CPUAccounting=false
TasksAccounting=false
MemoryAccounting=false
[Install]
WantedBy=default.target`
from lsmcd.
RemainAfterExit=yes should be sufficient. What OS and version are you running?
from lsmcd.
My OS is Ubuntu 20.04 LTS.
This line is default is lsmcd.service file. My lsmcd run for a while and stopped without any error output...
from lsmcd.
Please verify that lsmcd is actually not running any more. The service will show stopped, but there will be a PID running that you can see with ps -ef|grep lsmcd
.
from lsmcd.
Please verify that lsmcd is actually not running any more. The service will show stopped, but there will be a PID running that you can see with
ps -ef|grep lsmcd
.
Ya, I have start it again for a few minutes ago. Now I will wait for the stopped event and update information here.
from lsmcd.
root@ip-10-0-0-10:~# /usr/local/lsmcd/bin/lsmcdctrl status
lsmcd is running with PID 300849.
Final rc: 0
root@ip-10-0-0-10:~# service lsmcd status
● lsmcd.service - LiteSpeed LSMCD Daemon
Loaded: loaded (/etc/systemd/system/lsmcd.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2022-08-17 14:52:12 UTC; 1 day 3h ago
Main PID: 735 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/lsmcd.service
Aug 17 13:55:36 ip-10-0-0-10 systemd[1]: Starting LiteSpeed LSMCD Daemon...
Aug 17 13:55:38 ip-10-0-0-10 lsmcdctrl[679]: [OK] lsmcd: pid=735.
Aug 17 13:55:38 ip-10-0-0-10 lsmcdctrl[679]: Final rc: 0
Aug 17 13:55:38 ip-10-0-0-10 systemd[1]: Started LiteSpeed LSMCD Daemon.
Aug 17 14:52:12 ip-10-0-0-10 systemd[1]: Stopping LiteSpeed LSMCD Daemon...
Aug 17 14:52:12 ip-10-0-0-10 lsmcdctrl[13861]: [OK] lsmcd: stopped.
Aug 17 14:52:12 ip-10-0-0-10 lsmcdctrl[13861]: Final rc: 0
Aug 17 14:52:12 ip-10-0-0-10 systemd[1]: lsmcd.service: Succeeded.
Aug 17 14:52:12 ip-10-0-0-10 systemd[1]: Stopped LiteSpeed LSMCD Daemon.
root@ip-10-0-0-10:~# ps -ef|grep lsmcd
root 300849 1 0 18:11 ? 00:00:00 /usr/local/lsmcd/bin/lsmcd -f /usr/local/lsmcd/conf/node.conf
webserver+ 300852 300849 1 18:11 ? 00:00:03 /usr/local/lsmcd/bin/lsmcd
webserver+ 300853 300849 1 18:11 ? 00:00:03 /usr/local/lsmcd/bin/lsmcd
webserver+ 300854 300849 2 18:11 ? 00:00:05 /usr/local/lsmcd/bin/lsmcd
webserver+ 300855 300849 3 18:11 ? 00:00:09 /usr/local/lsmcd/bin/lsmcd
webserver+ 300856 300849 9 18:11 ? 00:00:24 /usr/local/lsmcd/bin/lsmcd
root 301983 1987 0 18:16 pts/1 00:00:00 grep --color=auto lsmcd
root@ip-10-0-0-10:~#
So lsmcd is running right?
How to ensure that sock file is still running?
from lsmcd.
If lsmcd's still got a pid running, then the sock file is fine.
from lsmcd.
If lsmcd's still got a pid running, then the sock file is fine.
Yes! But the very strange issue is: after 2-3 hours later
-
Check by:
service lsmcd status
will output actived and runnning -
Check by:
/usr/local/lsmcd/bin/lsmcdctrl status
will output is not running
and check via LSCache Plugin > Connect failed.
from lsmcd.
Funny you should mention that. We've been doing some preliminary testing that seems to address the WP Cache problem by installing the libmemcached-awesome library and completely replacing the existing libmemcached library with it. It seems to have fixed the problem. If you don't mind giving something like that a try, we have an early cheat-sheet of instructions for it. We'd love to hear your experiences with it. Check out: https://docs.google.com/document/d/1GNZ3EOcOeBqYS19rl5rnGoh8I9N1BFU3htSn_IPaavg/edit?usp=sharing Thanks,
Bob
hello
just trying with the new libmemcached-awesome
I compiled it and make install and copied from /usr/local/lib/libmemcached* to /usr/lib/x86_64-linux-gnu/libmemcached* (Debian 11 amd64)
enabled SASL and multi-user
Cached.UseSasl=true
Cached.DataByUser=true
Cached.Anonymous=false
Cached.SaslDB=/etc/sasllsmcd
cleared DB: rm -R /etc/sasllsmcd
and re-created users:
saslpasswd2 -f /etc/sasllsmcd user1
saslpasswd2 -f /etc/sasllsmcd user2
upgraded litespeed WP plugin to 5.2
here the log from journal:
systemd[1]: Started LiteSpeed LSMCD Daemon.
and from tail -f /tmp/lsmcd.log:
just filled with these lines:
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.806 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.807 [ERROR] [PID: 16706] Successful SASL authentication not performed
2022-08-18 21:13:42.807 [ERROR] [PID: 16706] Successful SASL authentication not performed
WP plugin status:
Memcached Extension: Enabled
Redis Extension: Disabled
Connection Test: Failed <----
from lsmcd.
Certainly we'd expect the connection test to fail with SASL not working. First verify that you've put your updated passwords into the WP Cache configuration for your users. When you're sure your configuration is right, please open a ticket with LiteSpeed and reference Bob and we can then send detailed information back and forth.
Thanks,
Bob
from lsmcd.
okay i'll close this
from lsmcd.
That's ok. Put in LSMCD ref Bob in the subject and it will get to me. But it makes it so much easier with a ticket. You can include the lsmcd.log file as well. Thanks,
Bob
from lsmcd.
Related Issues (20)
- lscmd not started HOT 12
- stats items not working HOT 4
- "Binary data is too long" in log - Multiple times every second HOT 12
- FATAL ERROR alloc2 cross large page boundary HOT 2
- LSMCD is filling up the /tmp/lsmcd folder after the latest update HOT 9
- Benefits over Memcached? HOT 3
- Update LSMCD codebase to Memcached v1.6 for meta protocol and syscall batching support HOT 1
- Clearing object cache for a single WP site HOT 1
- update and version HOT 1
- ip HOT 1
- LogLevel not being honored HOT 3
- Unable to locate package lsphp74-memcached
- LSMCD not work with unix socket HOT 3
- sasl PHP Fatal error HOT 8
- uninstall.sh HOT 1
- Make install error centos7 HOT 2
- Compile error HOT 4
- Differences with Memcached: CACHESIZE and stats
- Sasl user database HOT 1
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 lsmcd.