LSPHP Daemon mode and shared Opcache

#1
Hi, I'm currently running the trial version of Litespeed Enterprise, along with a Plesk panel.

So far everything it's working, but I'm struggling trying to configure lsphp daemon mode with a shared opcache.

I tried creating and external app to override the settings, configured as daemon, and I see it starts a lsphp process owned by root, but when I access some website it spawns an independent process with an independent opcache. I also tried removing the custom php.ini for the domains.

I'm I missing something? It's even possible to have a shared opcache while using plesk?

Thanks in advance!

Pd: if I disable Apache suexec in the General settings, then it works...but since this server would be used for shared hosting I cannot leave it that way.
 
#3
I tried with both 7.4 and 8.0 and with Detached mode enabled/disabled but I see no difference, to give some background I'm triying to archieve this:

https://www.litespeedtech.com/open-source/litespeed-sapi/php/daemon-mode
When running in Daemon mode, all PHP processes share the same opcode cache memory. This allows for a larger opcode cache memory block with an improved cache hit rate due to less frequent flushes.

I followed this guide to configure the external app:
https://docs.litespeedtech.com/lsws/cp/plesk/configuration/

I see an lsphp process running on startup, owned by root:
lsphp1.png

But when I open some website I see the new lsphp process is not a child of the first one and the Opcache is not shared (looked in phpinfo in multiple sites.)
lsphp2.png

I also removed all the custom php.ini files:

Limitations

Daemon mode does not allow the use of custom per-user php.ini files. As a result, LiteSpeed Web Server will automatically switch to Worker mode at the Server level if it detects a custom php.ini file.


I could work with the proccess group mode, but it would be nice to have one large opcode cache pool.

For more information, I see in the logs and looking at the sockets in /tmp/lshttpd that in the startup litespeed parses the apache config files and it seems that it dynamically creates the vhost and assigns each of them an independant external app that is dynamically generated too instead of using the externalapp I created.

Thanks for the help!
 
Last edited:

NiteWave

Administrator
#4
have you configured it under "External App" tab ? if so, remove all definitions under that tab and configure it under "PHP" tab instead.
you may get what you want.

however, a few days back, we just noticed Daemon mode has caused fatal error with php80/php81. please refer https://www.litespeedtech.com/suppo...settings-dont-save-when-lsws-is-active.21227/
 
Top