OpenLiteSpeed 1.4.21 Released! Improved Efficiency, Bug Fixes, and More!

134 views
Skip to first unread message

Rob Holda

unread,
Aug 2, 2016, 2:01:17 PM8/2/16
to OpenLiteSpeed Development
Hey There Everyone,

OpenLiteSpeed 1.4.21 is now released! This version improves the efficiency of our open file cache. OpenLiteSpeed will now attempt to write the real time report to /dev/shm if it is available instead of /tmp/lshttpd. This is to address the concern that writing to disk every second might reduce disk lifespan. This version also fixes a bug where handling static files caused the number of open files to keep growing. This would sometimes cause a 503 error.

Download link here

The packages should be available soon.

Cheers,
Rob

Rob Holda

unread,
Aug 2, 2016, 5:35:34 PM8/2/16
to OpenLiteSpeed Development
There is currently an issue with OpenLiteSpeed 1.4.21 where you may get error messages printed to your error log about the real time report. To avoid this error, if you have not done so already, please do not upgrade to this version until further notice is given. We will fix this error very soon.

Sorry for any inconvenience,
Rob

Rob Holda

unread,
Aug 3, 2016, 3:21:52 PM8/3/16
to OpenLiteSpeed Development
Hello all,

A new build of OpenLiteSpeed 1.4.21 is now released! Please update to this new build as it fixes the bug mentioned in my previous post.

You can download the new build here

Cheers,
Rob

Taffy

unread,
Aug 3, 2016, 4:11:27 PM8/3/16
to openlitespee...@googlegroups.com
Doesn't look like this bug has been fixed, just installed latest build and my logs are filling up fast with 'Failed to open the real time report'

Would appear that the server doesn't configure /dev/shm correctly.

[STDERR] PHP Warning: file_get_contents(/tmp/lshttpd/.rtreport): failed to open stream: Permission denied in /usr/local/lsws/admin/html.open/lib/ows/RealTimeStats.php on line 60

.rtreport -> /dev/shm/ols/.rtreport This link doesn't exist.

David

unread,
Aug 3, 2016, 4:42:46 PM8/3/16
to OpenLiteSpeed Development
Sorry to hear that. We will figure out it soon.
Can you check if /dev/shm exists or not, if yes, what is the permission?
Do you run openlitespeed with root user?
Can you provide more info, such as OS, bit?

Thanks.
David


On Wednesday, August 3, 2016 at 4:11:27 PM UTC-4, Taffy wrote:
Doesn't look like this bug has been fixed, just installed latest build and my logs are filling up fast with 'Failed to open the real time report'

Would appear that the server doesn't handle situations where /dev/shm isn't available.

Taffy

unread,
Aug 3, 2016, 5:44:55 PM8/3/16
to OpenLiteSpeed Development
Hi,

Sorry I corrected my original post, /dev/shm/ does exist with global r/w/x permissions.  The ols directory exists with 750 permissions (owned by root), but the .rtreport file does not exist, so the symlink has failed.

The OS is Amazon Linux 64bit (EC2), and openlitespeed is started by root but runs as the nobody user.  I have 3 of these servers, and the same occurrence happened on all of them.

David

unread,
Aug 3, 2016, 6:36:27 PM8/3/16
to openlitespee...@googlegroups.com
Can you manually change the ols permission to 755 so that the php can read the content?
We will fix this bug by set the permission of the ols with 755 while creating it.

Thanks.
David
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.
To post to this group, send email to openlitespee...@googlegroups.com.
Visit this group at https://groups.google.com/group/openlitespeed-development.
For more options, visit https://groups.google.com/d/optout.

Taffy

unread,
Aug 3, 2016, 6:48:38 PM8/3/16
to OpenLiteSpeed Development
This also hasn't worked, changing permissions to 777 did, so must be an ownership issue.  I changed ownership of the ols dir to nobody to match openlitespeed, and reset to permissions 750 - this has worked successfully.

David

unread,
Aug 3, 2016, 7:46:32 PM8/3/16
to openlitespee...@googlegroups.com
Good.  So maybe the "chown" code does not work. I will figure out it soon.
Thanks.
David



On 8/3/2016 6:48 PM, Taffy wrote:
This also hasn't worked, changing permissions to 777 did, so must be an ownership issue.  I changed ownership of the ols dir to nobody to match openlitespeed, and reset to permissions 750 - this has worked successfully.

David

unread,
Aug 4, 2016, 10:36:03 AM8/4/16
to openlitespee...@googlegroups.com
I updated the code of creating the /dev/shm/ols directory, I think it will handle your case.
I just updated the github code.
Thanks.
David

Yang

unread,
Aug 7, 2016, 4:27:28 AM8/7/16
to OpenLiteSpeed Development

Hi

You must delete old /dev/shm/ols directory then report can be work fine , I have test .
So you can add this to your github code .


在 2016年8月4日星期四 UTC+8下午10:36:03,David写道:
I updated the code of creating the /dev/shm/ols directory, I think it will handle your case.
I just updated the github code.
Thanks.
David


On 8/3/2016 7:46 PM, David wrote:
Good.  So maybe the "chown" code does not work. I will figure out it soon.
Thanks.
David


On 8/3/2016 6:48 PM, Taffy wrote:
This also hasn't worked, changing permissions to 777 did, so must be an ownership issue.  I changed ownership of the ols dir to nobody to match openlitespeed, and reset to permissions 750 - this has worked successfully.
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-development+unsub...@googlegroups.com.

Trever Jones

unread,
Aug 20, 2016, 1:55:37 PM8/20/16
to openlitespee...@googlegroups.com
I'd like to say that everything I read here and tried works, but so far none of it fixes this issue.  The realtime logs do get created and do run for a period of time, 1-2 minutes and then disappear.  I've changed ownership, permissions, etc.  This is on CentOS7 using the rpm pacakges.  Also happening on 1.4.22.

Taffy

unread,
Aug 22, 2016, 1:00:36 AM8/22/16
to OpenLiteSpeed Development
Can't say I've had the same problem.  I'm building from source and using Amazon Linux, which I believe is similar to CentOS/RedHat 6.  Maybe try a source build?  It's not too tricky, and if it's still no go then it must be a CentOS 7 issue?

Trever Jones

unread,
Aug 22, 2016, 8:10:16 AM8/22/16
to openlitespee...@googlegroups.com
I tried that first and same issue. I went to CentoOS because that is one of the distro's that is built for, but I also tried this on Fedora Core too.  For  some reason the .status and .reports disappear after a couple of minutes.  The server continues to run though and pages are accessible.  I've tried using both PHP 55 & PHP 56 from the repository too and also have built them from scratch and nothing helped there either. I do have 22 running on a Centos 7 box without issue utilizing the same install method, but not sure why it works and this one doesn't.  I've checked permissions, etc.

David

unread,
Aug 22, 2016, 9:10:19 AM8/22/16
to openlitespee...@googlegroups.com
About the .rtreport file, it was in the /tmp/lshttpd and it will be updated each second.
Some user was concern about to write the HDD too often may harm the HDD, so that we changed to the shared memory which is in the /dev/shm, and openlitespeed will create a directory ols/ in it, then we create a symbolic link /tmp/lshttpd/.rtreport which is linked to /dev/shm/ols/.rtreport .
If the /dev/shm/ols/ can be read/write by "nobody" and it should be all right.
The latest 1.4.22 will check the permission of the /dev/shm and /dev/shm/ols even exist, and if the permission is not enough then will change it.
If you still have this issue(ERROR in the errorlog file, such as "Failed to open the real time report"), please give me the feedback of these info:

The user/group in the server configure;
ls -l /dev/ ;
ls -l /dev/shm/ ;
ls -l /dev/shm/ols/;

Thanks.
David

On 8/22/2016 8:10 AM, Trever Jones wrote:
I tried that first and same issue. I went to CentoOS because that is one of the distro's that is built for, but I also tried this on Fedora Core too.  For  some reason the .status and .reports disappear after a couple of minutes.  The server continues to run though and pages are accessible.  I've tried using both PHP 55 & PHP 56 from the repository too and also have built them from scratch and nothing helped there either. I do have 22 running on a Centos without issue utilizing the same install method, but not sure why it works and this one doesn't.  I've check permissions, etc.


On Monday, August 22, 2016 at 12:00:36 AM UTC-5, Taffy wrote:
Can't say I've had the same problem.  I'm building from source and using Amazon Linux, which I believe is similar to CentOS/RedHat 6.  Maybe try a source build?  It's not too tricky, and if it's still no go then it must be a CentOS 7 issue?
--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.

Trever Jones

unread,
Aug 22, 2016, 9:25:02 AM8/22/16
to OpenLiteSpeed Development
I am familiar with all of those folders and like I said the /tmp/lshttpd/.status and links to .report do work fine they do show up and do work for about 2 minutes and then they completely disappear and do not recreate.

abbreviated /dev/
drwxrwxrwt.  3 root root          60 Aug 21 01:45 shm

/dev/shm/
drwxr-xr-x. 2 nobody nobody 200 Aug 21 22:34 ols

/dev/shm/ols
-rw-r--r--. 1 nobody nobody 1927 Aug 22 09:22 .rtreport
-rw-r--r--. 1 nobody nobody 1925 Aug 22 09:22 .rtreport.2
-rw-r--r--. 1 nobody nobody 1926 Aug 22 09:22 .rtreport.3
-rw-r--r--. 1 nobody nobody 1927 Aug 22 09:22 .rtreport.4
-rw-r--r--. 1 nobody nobody 1926 Aug 22 09:22 .rtreport.5
-rw-r--r--. 1 nobody nobody 1931 Aug 22 09:22 .rtreport.6
-rw-r--r--. 1 nobody nobody 1933 Aug 22 09:22 .rtreport.7
-rw-r--r--. 1 nobody nobody 1934 Aug 22 09:22 .rtreport.8


This is /tmp
drwxr-xr-x. 3 nobody nobody 4096 Aug 22 09:19 lshttpd


/tmp/lshttpd

-rw-r--r--.  1 root   nobody  6 Aug 22 09:19 lshttpd.pid
srwxr-xr-x.  1 nobody nobody  0 Aug 21 22:34 lsphp.sock
srwxr-xr-x.  1 nobody nobody  0 Aug 21 22:42 lsphp.sock.021
srwxr-xr-x.  1 nobody nobody  0 Aug 21 22:35 lsphp.sock.139
srwxr-xr-x.  1 nobody nobody  0 Aug 21 23:12 lsphp.sock.240
srwxr-xr-x.  1 nobody nobody  0 Aug 21 23:00 lsphp.sock.469
srwxr-xr-x.  1 nobody nobody  0 Aug 21 22:34 lsphp.sock.859
srwxr-xr-x.  1 nobody nobody  0 Aug 21 22:34 lsphp.sock.893
srwxr-xr-x.  1 nobody nobody  0 Aug 21 22:34 lsphp.sock.904
drwx------. 12 nobody nobody 86 Aug 22 09:17 swap


The links to .reports and the .status disappear from the /tmp folder.  Initially the logs do work fine, I can watch realtime stats, but between 2-3 minutes it will die.  Listeners show they are offline (even though they are not).

David

unread,
Aug 22, 2016, 9:43:29 AM8/22/16
to openlitespee...@googlegroups.com
Yes, your permissions seem to be good.
So, do you mean the symbolic link files were deleted after running 2 minutes? Such as somebody remove the files in /tmp/lshttpd/*.
Can you verify that the files in the /dev/shm/ols will be updated each second?
The symbolic link files will be created only when the worker starting, if they are removed, the issue will happen.

Trever Jones

unread,
Aug 22, 2016, 9:57:21 AM8/22/16
to OpenLiteSpeed Development
The report files in /dev/shm/ols are updated and continue to update ever second.  They don't disappear.  Now the symbolic link files and also .status do disappear from the /tmp/lshttpd folder, but none of the other files/folders turn up missing.  They stay, which is interesting that just the dot files disappear.  There is no one other than me with access to this server and the server is a clean install of CentOS7 specifically for this purpose.  This issue was also happening when I built from scratch on Fedora Core 24.  I had wondered if there was something that was clearing things in the /tmp folder and wondered if I could move those files to a different folder like /home/lshttpd/ (btw I did try moving everything else to that folder)

David

unread,
Aug 22, 2016, 10:14:10 AM8/22/16
to openlitespee...@googlegroups.com
This is strange, it seems the file was removed.
But it is OK, we decide to have this kinds of files configurable in the next release.

For your issue, please do a little update the code to fix it.
Update the file /usr/local/lsws/admin/html/lib/ows/RealTimeStats.php,
The line #6 is
    const RPT_PATH = '/tmp/lshttpd/' ;
Please update to
    const RPT_PATH = '/dev/shm/ols/' ;

Then the webAdmin will read the rereport file directly.

Thanks.
David

Trever Jones

unread,
Aug 22, 2016, 10:17:16 AM8/22/16
to OpenLiteSpeed Development
Thanks!

That takes care of the report files but what about the .status that disappears from /tmp?
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-development+unsub...@googlegroups.com.

David

unread,
Aug 22, 2016, 10:24:01 AM8/22/16
to openlitespee...@googlegroups.com
It should be OK since the .status file is only created when start the server, it won't be changed and these files will be accessed only by the webAdmin.
(BTW, they are hidden file, you need to ls -l -a to list them.)
Even no such files, the server still work, just the webAdmin can not view the status of the VHost running.
We will continue to work on that issues.
Thanks.
David
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.

Trever Jones

unread,
Aug 22, 2016, 10:30:20 AM8/22/16
to OpenLiteSpeed Development
I did the ls -la on that folder, it is gone.  Yes server even works without the symbolic links to reports.  It's just very odd that all the dot files disappear.   I was watching pid, etc. and all that stays the same, at first I thought maybe there was a crash and restart.  Maybe moving the .status also would be helpful?

David

unread,
Aug 22, 2016, 11:00:28 AM8/22/16
to openlitespee...@googlegroups.com
OK.
In the next release, we will config the both files to a customized directory, and you can set to whatever location you like.
Thanks.
David
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.

Trever Jones

unread,
Aug 22, 2016, 1:11:21 PM8/22/16
to OpenLiteSpeed Development
I wanted to let you know that I changed the code to create the .status iiin the /dev/shm/ols folder and then modified the php files to point to that .status and also to those .reports and so far so good.  I'm not sure why /tmp files disappear as I've set nothing up to clean it out, unless there is something that a default install of CentOS does with /tmp that I'm not familiar with. 

David

unread,
Aug 22, 2016, 1:40:54 PM8/22/16
to openlitespee...@googlegroups.com
Good to know that you fixed it.
I am also confused that why the file in the /tmp was removed, our code won't do that, so who did it? Just like there is a background task to do it.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages