This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

mpm prefork
#1
mpm prefork
Hello i need some help with my server & i have very high traffic around 3000 real time user; probably 300k Daily unique user and server is consuming Alot of Ram i need to restart my server every 2 hours to load the balance

Here's my server configuration:
[Image: RE1nWj1.png]

Here's my mpm_prefork.conf configuration:

<IfModule mpm_prefork_module>
StartServers 10
MinSpareServers 5
MaxSpareServers 100
MaxRequestsPerChild 50000
ServerLimit 2048
MaxClients 2048
</IfModule>

apache2.conf configuration:

Timeout 60
KeepAlive On
MaxKeepAliveRequests 600
KeepAliveTimeout 600
HostnameLookups Off

Any Idea how i can manage the load so it take less ram and more reliable & can i work on mpm_worker with php anyhow?
Reply
Thanks given by:
#2
RE: mpm prefork
You would better use varnish to offload the load on your server.

Same over Nginx.

Depend really if it's only a webserver or many hosts.

Also server crashing due to ram use... You may think about MySQL optimisation.

You can use also cloudflare as reverse proxy to reduce a bit the load on apache.

Those are few quick solution as I can't state over apache config (few informations).

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:
#3
RE: mpm prefork
(04-15-2016, 07:01 AM)Me.B Wrote: You would better use varnish to offload the load on your server.

Same over Nginx.

Depend really if it's only a webserver or many hosts.

Also server crashing due to ram use... You may think about MySQL optimisation.

You can use also cloudflare as reverse proxy to reduce a bit the load on apache.

Those are few quick solution as I can't state over apache config (few informations).

M B

i forgot to mention i'm already using cloudflare but still it's not helping that much! let's see and i've try varnish before but every month i've to change the apache2 port to 80 (/etc/sentora/configs/apache/httpd-vhosts.conf & httpd.conf i'm using apache2 port as 8080) and varnish crashes i need to change it to 8080 manually every time

PS: for varnish installation i've followed up this tutorial
http://www.servermom.org/configure-zpane...ache/1443/
Reply
Thanks given by:
#4
RE: mpm prefork
My advice if you can setup a VPS right in the same box even with 1 CPU and setup varnish with 1GO RAM to cache all static assets it will be a kill.

I had varnish working fine on an ATOM BOX and firing over 100MB/s. It's great for cache.

What about MySQL server load?
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:
#5
RE: mpm prefork
(04-15-2016, 07:37 PM)Me.B Wrote: My advice if you can setup a VPS right in the same box even with 1 CPU and setup varnish with 1GO RAM to cache all static assets it will be a kill.

I had varnish working fine on an ATOM BOX and firing over 100MB/s. It's great for cache.

What about MySQL server load?

Just installed varnish on the same server and it's working damn awesome Big Grin
it use it take around 4 gb ram before and now it's around 800mb Big Grin

[Image: hj9JjNC.png]

PS: for my.cnf
key_buffer = 160M
max_allowed_packet = 16M
max_connections = 10000
table_cache = 640
query_cache_limit = 10M
query_cache_size = 160M
max_allowed_packet = 160M
key_buffer = 160M

i'm using InnoDB in all the database but to be honest i don't have much use of mysql server
Reply
Thanks given by:
#6
RE: mpm prefork
Varnish is a beast... Just give him some room.

As I told you I tested it on ATOM box and it was able to handle all requests.

It's damn fast and tiny.

You can tune varnish for ram use. It's your decision for how much ram you allocate for caching. It can use RAM/disk too...

Take care over caching sessions and dynamic pages. It can turn messy and unsecure. Mostly varnish should only cache static pages and forward all php and such requests.
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:
#7
RE: mpm prefork
(04-16-2016, 01:35 AM)Me.B Wrote: Varnish is a beast... Just give him some room.

As I told you I tested it on ATOM box and it was able to handle all requests.

It's damn fast and tiny.

You can tune varnish for ram use. It's your decision for how much ram you allocate for caching. It can use RAM/disk too...  

Take care over caching sessions and dynamic pages. It can turn  messy and unsecure. Mostly varnish should only cache static pages and forward all php and such requests.

Sir my httpd-vhosts.conf apache port changes back to port 80 whenever the demon run i guess probably every 5 mins, i need to change it manually or whenever i add the new domain this happen and i get the backend error from varnish any suggestion what should i do?

[Image: 4qrk7yd.png]
Reply
Thanks given by:
#8
RE: mpm prefork
If all your apache vhosts need to be on 8080 instead of 80, go to Module Admin > Apache Config >Apache Port = 8080
Or manually edit it in the DB sentora_core.x_settings row 80.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Apache prefork directives StefanMNS 4 13 ,922 12-03-2015, 02:33 AM
Last Post: chipset

Forum Jump:


Users browsing this thread: 1 Guest(s)