OpenLiteSpeed swapping directory keeps getting full

Hello,
I don’t know why the OpenLiteSpeed swapping directory (/tmp/lshttpd/swap) keeps growing in size over time until it is completely full. Trying to remove its content manually every time is not a good solution (using “rm -rf /tmp/lshttpd/swap/*” command), even using a cron job, because I want to know where is this issue is coming from to fix it forever. I have other servers using the same configuration but without any problem like this. I have tried to increase Memory I/O Buffer size to 200M and even more without any effect. Other servers have just 60M or 120M, and they are stable. I didn’t try to change the swapping directory path from OLS configuration, as I need to understand why this is happening if anyone of you have faced it before.
It is a dedicated server with 12 threads and 64G of RAM running Ubuntu 20.04 minimal on Hetzner, using CyberPanel 2.1.2 and OLS 1.7.15.
Any help please?
Thank you in advance.

I have faced the same issue in the past nearly 2 years ago on another server using CentOS 7, and posted about it in OLS forum but without any response from the community there:

Frankly, I don’t remember how it was fixed, maybe by itself.

There maybe a lot websites under this server which stores static cache files leading to greater usage of disk space.

Maybe this can be of any help to you?

There is just one website on the server which size is nearly 75GB, but I don’t think that the number of websites has a relation with this issue, as I have another server with many websites on it but without this issue (some of those website are big too), that’s why I can’t understand this issue.
As for the link you posted, I have already passed through it, in fact I searched a lot on the internet but without any real explication to the issue. What I see as a fix is to change the swapping directory path as described here:

or clear that folder via a cron job, but again, I need to understand why it is happening on that server and not on others?

Its completely dependent on the website configuration especially the litespeed cache part. This particular website is serving a lot in cache it seems.

Have you tried contacting litespeed support on this? They definitely will help on this part as they know it better why lswp is storing this big cache data for this site. You will have to give them server access when asked to debug.

As for configuration it has the same config as other server with more websites and some of them has like 20GB in size. As I wroth I have faced that issue 2 years before in another server that uses CentOS 7, but I don’t remember how it was fixed. I passed through every configuration on that server and compared it to this one with the issue without success.
As for contacting litespeed support, I have posted a link in my first reply here to my old issue that I posted 2 years ago in the litespeed community forum, but I didn’t get any reply until today after posting a reply yesterday with the new issue:

As you see, the guy who replied thinks that the issue maybe is related to CyberPanel, but I don’t think so.

Not at public forum, but try to raise support ticket in litespeed
https://store.litespeedtech.com/store/submitticket.php

Thank you so much! I have contacted them. I will post a reply with any news or fixes from them.

1 Like

The only solution that I was able to get, after contacting OpenLiteSpeed support team, is to change gzipCacheDir to other locations via OLS web admin, so I created the directory:
/opt/lshttpd/swap
by following this guide:

and then set it as Static Cache Directory via OLS web admin interface (Server Configuration>Tuning>Static Cache Directory under GZIP/Brotli Compression section), and restarted OLS after saving changes.
image

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.