Hi, I migrated my old ISPconfig + Apache webserver to AApanel + OpenLiteSpeed about 6 months ago.
At this time I went through some problems with OLS, with the creation of many PHP processes.
This causes a high load on memory usage, I often had mysql stopped due to this problem, unavailability of websites until the server stabilized, etc. After several weeks of studying, I discovered the reason for the problem
THE PROBLEM
Each virtual host has its process configuration done individually and not globally, with each one having up to 20 processes for use.
The problem appears when the number of sites becomes large: 100 websites * 20 processes = at least 100 LSPHP processes at each OLS reload, apart from the processes that must already be running per website.
From my own experience, from 50 websites you will start to have problems
THE SOLUTION
Define at least the maxConns and LSAPI_CHILDREN parameters globally, not individually per site. This way you will have real control over the amount of processes and memory used.
To apply the solution is simple, just comment (or remove) the lines related to maxConns and LSAPI_CHILDREN of websites / virtual hosts. Additionally, I also commented on the lines of minimum and maximum memory usage, to also control globally.
I'll leave my configuration file in link bellow as an example:
https://drive.google.com/open?id=13TgGMLeTIU2UdcF5UppbBasdGMy3_3Hr&authuser=mateus%40bestapp.com.br&usp=drive_fs
It is worth noting that I did not experience any loss of performance with this, neither on the sites, nor on the panel, nor on the server.
The solution is simple, but it took me a long time to understand and find out how it applies.
Honestly, I don't see any reason to define processes at the site level, so my suggestion for aaPanel developers is: Apply this improvement to files in the next updates. I've been using it for some time, I didn't have any loss, I just gained in stability.
IMPROVEMENT SUGGESTIONS
1) There are 4 files in the configuration that are added by default, but are used in specific cases:
- include /www/server/panel/vhost/openlitespeed/proxy/victore.com.br/urlrewrite/*.conf
- include /www/server/panel/vhost/apache/redirect/victore.com.br/*.conf
- include /www/server/panel/vhost/openlitespeed/redirect/victore.com.br/*.conf
- include /www/server/panel/vhost/openlitespeed/proxy/victore.com.br/*.conf
The problem with adding and not using is that it generates error log. My suggestion is to make it the same as the file for SSL, which appears only when SSL is added, and is removed if SSL is removed, this would make the configuration more consistent.
2) Expires
Make the expires default in the configuration file as 15552000 for all parameters. The default time (43200) is not recognized as a cache by browsers.
3) Wordpress BruteForce
For Wordpress sites, there is an OLS rewrite rule to prevent access to the xmlrpc.php and pingback file. To enable it, just add this line inside rewrite {}, in the virtual host configuration file:
RewriteRule ^ / (xmlrpc | wp-trackback) . Php - [F, L, NC]
CONSIDERATIONS
I love aaPanel!
I have used and tried several panels, and aaPanel is by far the best I have ever used. Everything is very simple and improves management a lot on a daily basis. There are always news and updates and even with all that, the panel is extremely light!
I used my time to write this long review to help users who may be experiencing similar problems and also to help make aaPanel an ever better solution.
I sincerely hope that my text will be useful =)
Regards,