Skip to main content

What is Mod_ISAPI? Configuration File Path? Ideal VALUES FOR /etc/apache2/conf.d/lsapi.conf

General Mod_ISAPI Errors and Resolutions:

Error 1: Reached max children process limit

The apache error log shows:

Reached max children process limit: 80, extra: 0, current: 80, please increase LSAPI_CHILDREN.


Solution:

I increased it here:
 /etc/apache2/conf.d/lsapi.conf

and restarted apache (service httpd rtstart) so the error was removed.



Error 2(Error receiving response header (lsphp is killed?):

[Wed Oct 28 10:04:49.506913 2015] [lsapi:error] [pid 796150] [client 217.165.79.204:4274] [host www.domain.com] Error receiving response header (lsphp is killed?): ReceiveResponseHeader: receive pkg hdr failed: ReceiveLSHeader: nothing to read from backend socket, referer: http://www.domain.com/
Solution:

Fixed. I've updated mod_lsapi to the latest version and changed some of its parameters in config /etc/httpd/conf/conf.d/lsapi.conf (lsapi_backend_max_process_time- from 300 to 3600, lsapi_terminate_backends_on_exit -to Off). Now site works (please see attachment).



Navigation:  »No topics above this level«

Apache mod_lsapi

Previous pageReturn to chapter overviewNext page


[beta]

Apache mod_lsapi is a module based on LiteSpeed Technologies API for PHP, Ruby and Python. It offers excellent PHP performance, low memory footprint coupled with great security and support for opcode caching.

How it works

mod_lsapi is a part of Apache;

Apache passes handling for PHP request to mod_lsapi;

mod_lsapi uses liblsapi to transfers request lsphp daemon;

lsphp processes request and return data to mod_lsapi;

Each user has lsphp processes in separate CageFS/LVE;

If there is no requests for lsapi_backend_pgrp_max_idle seconds, lsphp process is terminated;

If no lsphp processes available when new request comes, new lsphp process is created;

lsphp can process lsapi_backend_children requests simultaneously.

mod_lsapidiagrammNEW

What is lsphp

lsphp - PHP + LSAPI. What is LSAPI? LiteSpeed Server Application Programming Interface (LSAPI) is designed specifically for seamless, optimized communication between LiteSpeed Web Server and third party web applications. Now this protocol is available for Apache 2.2/2.4.

Using LSAPI, we have seen higher performance than Apache with mod_php, easier installation than php-fpm and easier integration with any control panel. LSAPI means faster and more stable dynamic web pages.

Requirements

CageFS (installed and initialized)

Alt-PHP

Apache with SuExecuUserGroup directive for each user's VirtualHost,

mod_ruid2 disabled

apache itk disabled

Configuration Options

Options

Description

Level

php_value, php_admin_value, php_flag, php_admin_flag

mod_php emulation

httpd.conf, virtualhost, htaccess

lsapi_backend_connect_timeout

number of usec to wait while lsPHP starts (if not started on request)

httpd.conf

lsapi_backend_connect_tries

number of retries to connects to lsPHP daemon

httpd.conf

lsapi_terminate_backends_on_exit

httpd.conf, On - stop lsphp services on apache restart, Off - leave live started lsphp services on apache restart (for php+opcache). The lsphp will not restart, even if Apache gets restarted.

httpd.conf

lsapi_backend_children

sets env variable LSAPI_CHILDREN
# lsphp also try to read PHP_LSAPI_CHILDREN var

# Required and should be >0 in order to enter into self-managed mode

# min value is 1; max value is 10000. if var value is more, 10000 will be used.

httpd.conf

lsapi_backend_max_process_time

env variable LSAPI_MAX_PROCESS_TIME