News

SMF - Just Installed!

Author Topic: High memory consumption in lsphp to generate SSL certificate  (Read 553 times)

mateus1020

  • Newbie
  • *
  • Posts: 8
    • View Profile
Hi!

I did several and several tests and I don't know how to proceed anymore.

I have a webserver using aaPanel + OLS v. 1.6.5. Everything works perfectly. My problem appears when I need generate SSL certificate. I realize that when I generate a certificate for a new website, the server load goes up considerably.

Using the top command, I realized that when a new certificate is generated, several lsphp processes are created, which causes high server usage.

I also realized, testing in another vm, that this problem does not happen when the number of sites using php on the server is small (I took a snapshot of the server, excludes all websites and left only one with php).

Has anyone had a similar situation?

Thanks in advance!



Floyd

  • Administrator
  • Newbie
  • *****
  • Posts: 16
    • View Profile
Reply #1 on: October 22, 2020, 07:14:38 AM
Does this load only occur when the certificate is being issued?



mateus1020

  • Newbie
  • *
  • Posts: 8
    • View Profile
Reply #2 on: December 01, 2020, 01:57:55 AM
Hi,

sorry for the delay, I only saw the answer now.

answering your question: no. It create several processes when I perform other tasks as well, such as:
- Add Site;
- Enable / Disable write access log;
- Enable / Disable redirect;
- Generate SSL;
- Force HTTPS;
- Disable / Delete SSL

I opened the same topic in a more detailed aaPanel forum. I will add the other details here. thanks for listening!

------------

Hi,

I deepened the research!

I found out that OLS controls, through the configuration file, the maximum number of processes that can be created, reference below:

https://openlitespeed.org/kb/troubleshooting-too-many-lsphp-processes-on-da-when-using-ols/

I added the settings, and confirmed through the OLS, panel that they were read by him.

But, the lsphp continues to generate several processes = (

Perhaps this configuration should be done elsewhere, in addition to the main file, to be read and executed correctly by aaPanel.

I also noticed that this same behavior (creating several processes) appears with other operations such as:

- Add Site;
- Enable / Disable write access log;
- Enable / Disable redirect;
- Generate SSL;
- Force HTTPS;
- Disable / Delete SSL

I hope the information is useful, and I am available for any necessary simulation or testing

Thanks!

------------



Floyd

  • Administrator
  • Newbie
  • *****
  • Posts: 16
    • View Profile
Reply #3 on: December 01, 2020, 02:44:24 PM
I have done some testing with aapanel and open litespeed and noticed quite a few issues, I could not get ipv6 to work except with apache. I never had any load issues though, so that may be server related. The only way to know for sure would be to install open litesppeed with cyberpanel and see if that works or not.



mateus1020

  • Newbie
  • *
  • Posts: 8
    • View Profile
Reply #4 on: December 01, 2020, 04:28:04 PM
Right,

unfortunately, it would take a very long time for me to migrate all sites to a server with cyberpanel and perform the tests.

From the tests I did, this high process load only appears when there is a large number of sites inside the server using php. So I believe there may be some configuration within the files.

extprocessor clientwebsite.com {
  type                    lsapi
  address                 UDS://tmp/lshttpd/clientwebsite.com.sock
  maxConns                20
  env                     LSAPI_CHILDREN=20
  initTimeout             600
  retryTimeout            0
  persistConn             1
  pcKeepAliveTimeout      1
  respBuffer              0
  autoStart               1
  path                    /usr/local/lsws/lsphp74/bin/lsphp
  extUser                 www
  extGroup                www
  memSoftLimit            2047M
  memHardLimit            2047M
  procSoftLimit           400
  procHardLimit           500
}

Can you tell me what these parameters do?
- maxConns
- LSAPI_CHILDREN

Can changing these parameters decrease the amount of processes created by lsphp?

Thanks for your attention!



Floyd

  • Administrator
  • Newbie
  • *****
  • Posts: 16
    • View Profile
Reply #5 on: December 01, 2020, 05:43:31 PM
The problem with aapanel is that it uses an Openlitespeed plugin instead of being generic like with cyberpanel or openlitespeed on it's own.

Openlitespeed should handle way more concurrent connections than apache or even nginx.

Does your server have enough RAM and processor power to handle the load that all your sites are generating?



mateus1020

  • Newbie
  • *
  • Posts: 8
    • View Profile
Reply #6 on: December 01, 2020, 07:30:43 PM
Yes,

The peak of memory occurs only when I do one of the above actions.
In normal operation, memory usage is very low (1.2 GB of 4 GB).

This is actually the only critical problem I had with aaPanel. And it appears only with OLS, using Apache and Ngix the memory peaks do not occur.

Again, thank you for all your attention!




mateus1020

  • Newbie
  • *
  • Posts: 8
    • View Profile
Reply #7 on: December 03, 2020, 07:13:10 PM
I expressed badly =)

I have access to WebAdmin, I can access it and check the settings through it.

I wanted to ask if, using the WebAdmin panel, I can check something that may have to do with the problem.

Yes, I installed OLS first and then the other packages (mysql, pure-ftp, phpmyadmin, php).

On another virtual machine I tried to remove everything and install again, but without success = (



Floyd

  • Administrator
  • Newbie
  • *****
  • Posts: 16
    • View Profile
Reply #8 on: December 03, 2020, 07:52:44 PM
If you have another virtual machine, I would install cyberpanel and see how it compares. It is completely free (and unlimited) as long as you choose OpenLitespeed as the webserver.

https://cyberpanel.net/docs/installing-cyberpanel/
« Last Edit: December 03, 2020, 07:56:53 PM by Floyd »



mateus1020

  • Newbie
  • *
  • Posts: 8
    • View Profile
Reply #9 on: December 03, 2020, 08:02:30 PM
Ok, I will try as soon as possible



thank you!