OpenLiteSpeed swapping directory keeps getting full


New Member
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 it is full 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 for ever. 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. It is a dedicated server with 12 threads and 64G of RAM using CyberPanel 2.0.2 and OLS 1.6.17.
Any help please?


After nearly 2 years now, I'm facing the same issue on a new dedicated server with 12 threads and 64G of RAM running Ubuntu 20.04, using CyberPanel 2.1.2 and OLS 1.7.15.
Any fix to that issue please?
Hmm to be honest, I don't really know. I'm not facing this issue on a pure ols install, perhaps this is a cyberpanel thing.

I think a cron job is your best friend while we don't know the origin
I don't think that CyeberPanel has relation to the issue, as it is happening in the OLS swapping directory. Maybe I should try to deactivate WordPress LiteSpeed Cache plugin, maybe it has relation with it, but what I can't understand is why it is happening on that server, but not on others? It's strange.


I saw a ticket with a similar question, maybe it's from you?

The solution is,
Static file compression will share the /tmp/lshttpd/swap/ directory as normal LSWS swap files. You can reset gzipCacheDir to other locations such as /opt/lswsgzipcache/ etc via OLS web admin.
Me again about the same problem. I have changed the gzipCacheDir location, but swap folder keeps growing at the new location. Today I noticed that it has more than 40G in size! So in this case I must monitor and empty it regularly via a cron job, or the storage space will get full. I don't think this is normal as it is not happening on other servers with more websites, some of them are big too. I think the issue has relation with LSC plugin and OLS cache system, even thought I passed on every LSC plugin setting but without success.
Thanks for your reply, but OpenLiteSpeed doesn't store error file there (in the swap folder), so the issue has no relation with logs, but it's coming from compressed files that OLS stores. I have already contacted them via ticket, and they just suggest changing the swap directory, so it can be larger than tmp folder, but eventful it keeps growing, and in this case the disk space will get full because of it.