Apache2 and php after an httpd process memory soared to 28 M, how to solve-php Tutorial

Source: Internet
Author: User
After apache2 and php, the memory of an httpd process soared to 28 MB. before php was added, each httpd process consumed about 1 MB of memory. However, after php was added, the memory reached 28 MB, how can I adjust the memory usage of each httpd? Thank you ------ solution ------------------ I am still 33 M local. It should be normal. ------ Solution ------------------ view apa apache2 with php, the memory of an httpd process soared to 28 M
Before adding php, each httpd process uses about 1 MB of memory, but after adding php, the memory reaches 28 MB. how can I adjust the memory usage of each httpd?

Thank you.

------ Solution --------------------
I am still 33 M local. It should be normal.
------ Solution --------------------
View the concurrent multi-process module of apache and view the mode (work, prefork, mpm ). Adjust the maximum number of sub-processes in this module.
For more information, see the manual.

------ Solution --------------------
How much can I save for dozens of MB. How much memory does your machine have.


Discussion

Reference:
View the concurrent multi-process module of apache and view the mode (work, prefork, mpm ). Adjust the maximum number of sub-processes in this module.
For more information, see the manual.


Is this related to the above configuration of apache? Before the php module is added, the memory of each httpd process is about 1 MB. when the php module is added, the memory usage of each httpd process is increased to 28 MB. how can I reduce the memory occupied by each httpd process?

------ Solution --------------------
On apache installation, multiple-process modules, mpm, work, and prefork are installed. It can control the maximum number of processes and threads. Since you do not have much memory, it is not a good way to limit the number of processes.
------ Solution --------------------
You can view the number of processes on your server:

Ps-ef | grep httpd | wc-l
------ Solution --------------------
Just added the php module? Remove unnecessary so extensions in php to see if they are helpful.
------ Solution --------------------
It seems to be normal!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.