LSAPI application, possible dead lock.

This came up before, but the thread digressed into other problems.
Centos 7 / OLS 1.5.6 / Cyberpanel 1.9

1). Wordpress sites when scanned by crawler (e.g. google, twitter) can cause a number of these errors:

No request delivery notification has been received from LSAPI application, possible dead lock.

2). The above errors seem to keep file handles open to the sockets for the specific Vhost crawled.

3). Over time the open files issue will cause OLS to error with 503s and cause an automatic restart. (to many open files)

4). The automatic restart will leave zombie threads with open file handles – openlitespeed (lshttpd - #01)

I have gone through everything I can find…
– increased the open file limit in OS
– increased the timeout for external apps in OLS (based on OLS forum and Digital Ocean recommendations)
– disabled plugins in WP

I have narrowed it down to crawler visits by IP, but it does not involve specific pages / themes / plugins or even websites.

any help would be appreciated…


Answering my own question here…because I made some progress.

1). The LSAPI application, possible dead lock error message still happens with crawlers. However, in OLS 1.6 there is mention that this is coming from a to short timeout for reporting PHP processes - 10sec. The crawlers do set off JS downloads but do not receive them…so this looks like a Litespeed Issue.

2). The automatic restart leaving zombie threads with open file handles – seems to have been fixed with the latest OLS update. It was part of a graceful restart, but must have been leaving the zombies.

3). The 503s where being caused by TOO Many Files Open errors.
a. The “files open” where in fact the cache files…
b. OLS has the internal Crawler enabled…that combined with outside crawlers was filling up the cache.That was pushing LSWS over the open file limit.

So finally the main issue…all the recommendations for setting the open file limit with OLS does not work.

On Centos 7 LSWS is being started by Systemd and Systemd completely ignores /etc/security/limits*.

One has to set it like this:

cat /etc/systemd/system/lsws.service.d/limits.conf


I was finally able to complete a link scan of my wordpress sites…without a crash. My openfiles for the main LSWS thread peaked at 27k.