CahitEy
asked on
High mem problem PHP
every time when somebody visit a site on my server it uses more then 140 mb ram per client on each site why this occurs ?
is there any setting for this on cpanel
Untitled.png
is there any setting for this on cpanel
Untitled.png
also you should start to look into this product
http://xdebug.org/
its will helps to debug if there is any memory leack problem of your script ..
but before that try to find out what happening with the server
http://xdebug.org/
its will helps to debug if there is any memory leack problem of your script ..
but before that try to find out what happening with the server
ASKER
i have made double checkt to /usr/lib/php.ini
as seen on code part
where
i have compiled php with cpanel's interface without any error
where could i find error logs of apache and php ?
as seen on code part
where
i have compiled php with cpanel's interface without any error
where could i find error logs of apache and php ?
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M ; Maximum amount of memory a script may consume (32MB)
if you install apache by yum install httpd
then /var/log/httpd/all error log ( error.log, yorudomain.com-error ..)
or if your install via source
it could be
/usr/local/apache/logs/ directory
try to turn on , errror-reporting from php.ini to see if its through any error
also try to increase debug log value from apache config directory
then /var/log/httpd/all error log ( error.log, yorudomain.com-error ..)
or if your install via source
it could be
/usr/local/apache/logs/ directory
try to turn on , errror-reporting from php.ini to see if its through any error
also try to increase debug log value from apache config directory
ASKER
i think it is very huge so i decide it to install on a site check this out please :
http://3xlhost.com/error_log.txt
http://3xlhost.com/error_log.txt
Ok those all are error.. but you should fixed some of those .. they might put impact on server
here, the way i configure php with Apache your configuration is different so here you got php as process because you have cpanel
what i am trying to understand is :
suppose if 10 user browse your server concurrently is it creating 10 php process ????
here, the way i configure php with Apache your configuration is different so here you got php as process because you have cpanel
what i am trying to understand is :
suppose if 10 user browse your server concurrently is it creating 10 php process ????
ASKER
unfortunatelly yes check the image 5 person hit the murat's site and the result :(
i have added 12 gb ram but it is not enough for nights :D that is non logical
Untitled.png
i have added 12 gb ram but it is not enough for nights :D that is non logical
Untitled.png
you have a php zombi process (defunct) kill that one
if its create 5 http + 5 php process.. pretty bad ....
what product you using ???
i guess its due to your cpanel .....
need to find out if its normal for cpanel base server or its abnormal
for http process i saw process more then 100Mb depends size of your website ... this that
all your website, does it developed by u ?? or some top of the self product ?? what the name of your control panel ??
if its create 5 http + 5 php process.. pretty bad ....
what product you using ???
i guess its due to your cpanel .....
need to find out if its normal for cpanel base server or its abnormal
for http process i saw process more then 100Mb depends size of your website ... this that
all your website, does it developed by u ?? or some top of the self product ?? what the name of your control panel ??
ASKER
no it is just a vbulletin forum :S
also wordpress sites the same
i am using latest cpanel
also wordpress sites the same
i am using latest cpanel
dont like vbbulletin, it has bad reputation of memory lick anyway
if you turned off vbulletin and just keep browsing word press
how much loads your has ??
if you turned off vbulletin and just keep browsing word press
how much loads your has ??
ASKER
eren is wordpress site also check this out
scr2.png
scr2.png
run this
<?php phpinfo(); ?>
see where is your php.ini located
or just create a page with
<?php phpinfo(); ?> , give it a name , phpinfo.php
sent me the link
let me have a look at your php.ini file...
<?php phpinfo(); ?>
see where is your php.ini located
or just create a page with
<?php phpinfo(); ?> , give it a name , phpinfo.php
sent me the link
let me have a look at your php.ini file...
ASKER
check it from here please :
http://www.moviegy.com/
http://www.moviegy.com/
your php memory limit is set to 32 but its taking more hten 100Mb which does not make sense ...
is there any way to turnoff cpanel too see if it reduces memory uses ???
is there any way to turnoff cpanel too see if it reduces memory uses ???
ASKER
i do not think so, because it is working independent from httpd module , when i make a
service httpd stop
cpanel is going on working :)
but any of this is not logical there is sth. really wrong and i am having big problems on crowded hours
service httpd stop
cpanel is going on working :)
but any of this is not logical there is sth. really wrong and i am having big problems on crowded hours
no, dont stop httpd process,
i dont know how cpanel works.. but can you not stop cpanel to run ????
or if you stop cpanel process , httpd will stop aswell ???
i dont know how cpanel works.. but can you not stop cpanel to run ????
or if you stop cpanel process , httpd will stop aswell ???
ASKER
ommmmm dont know .... something not right...
I am running basic wordpress.. + modsecurity , httpd process is 58 MB each
your httpd is 72Mb which is fine...
but php proces is too big ...
let me google little bit ..
could not you compile php with apache ?? rather then php with cpanel!!!!
I am running basic wordpress.. + modsecurity , httpd process is 58 MB each
your httpd is 72Mb which is fine...
but php proces is too big ...
let me google little bit ..
could not you compile php with apache ?? rather then php with cpanel!!!!
ASKER
Cpanel's support answer as given below very funny :)
i am not able to build php without cpanel because this is a hosting enviroment for my friends and i need to use whm unfortunately ...
i will be looking forward for your answer i am also looking for a possible soluiton
additionally i am using a remote server for mysql :D
i am not able to build php without cpanel because this is a hosting enviroment for my friends and i need to use whm unfortunately ...
i will be looking forward for your answer i am also looking for a possible soluiton
additionally i am using a remote server for mysql :D
My message :
Sir this is a vps and let me say that when you check the image you could see each client creating its own php and httpd session That is mean for every client my apache using 200 mb ram for a vbulletin form (Not for db it is on another server) I have added 8 gb ram to this server and when my server gets 40 hits at the same time totally to all my sites It is down because it is over the swap and physical ram 40*200 = 8000 mb Without db connection for 40 client at the same time using 8 gb is logical ?
There is nothing with physical problems here it is a simple maths problem I have 8gb ram and each client uses 200 mb totaly with php and httpd so 40 client is make my all server down On asp.net runs only one instance for 400 client and file4share.net is my site also i have seen there 1000 people at the same time without using more then 1 gb ram Please check this careffuly this is not a hardware issue
Cpanel's message
The usage you are referring to is the virtual size of the task.
RES -> (53M, 45M, etc in the image) is the amount of RAM used by those processes and MEM -> shows the same in %
When you say 500 clients connect to your server, do you mean that your site gets 500 simultaneous hits ?
vbulletin, wordpress etc are database driven and such a huge number of hits will definitely overload the server.
You need to discuss with your service provider (or decide on your own) and get a dedicated server for the site that gets more traffic.
I understand your concern and know that you have opened many tickets regarding this, but we will be able to fix cpanel related issues only. You should address these memory problems with your service provider and server administrator.
Highest Regards,
Balaji S
Ok what he said is 60 % true....
RES is the main memory uses by the process..
but you should not forget VIRT.. which includes swap uses + memory uses...
I always look at VIRT to get a good idea ...
Now if they say that 53M RES is a good reasonable value for php process .. then have to take their words as its their products
then you will have to increase your Ram...
also one thing
you got 300Mb fre ram and 300MB buffer
so you actually have 600MB free ram ...
the top result is that your pick time ??
or as you said, in pick time your server is totally down ??
one thing you need to understand 40 user browsing your site and 40 concurrent request
40 user browsing that does not mean that 40 user browsing concurrently
RES is the main memory uses by the process..
but you should not forget VIRT.. which includes swap uses + memory uses...
I always look at VIRT to get a good idea ...
Now if they say that 53M RES is a good reasonable value for php process .. then have to take their words as its their products
then you will have to increase your Ram...
also one thing
you got 300Mb fre ram and 300MB buffer
so you actually have 600MB free ram ...
the top result is that your pick time ??
or as you said, in pick time your server is totally down ??
one thing you need to understand 40 user browsing your site and 40 concurrent request
40 user browsing that does not mean that 40 user browsing concurrently
ASKER
yes that is true when i count sessions of the users it is 400 nearly but if 40 hit gets from 400 user my server down but this is not normal 8gb ram for 400 - 500 user :S without db
check this
www.maxihayat.net this site is on another server with 16gb ram and quad processor
it gets 5000 active user and 160 site is using the same server
i give 8gbram and 4 processor of i7 but it gets down 400 users (40 hits)
what should i do more :S
check this
www.maxihayat.net this site is on another server with 16gb ram and quad processor
it gets 5000 active user and 160 site is using the same server
i give 8gbram and 4 processor of i7 but it gets down 400 users (40 hits)
what should i do more :S
and all these server (www.maxihayat.net ) running on cpanel ?? and php consuming same amount of ram ???
ASKER
it is running on plesk
the only difference that and as i said with 16 gb ram runs 160 site
maxihayat has 37000 active users :D
i could not understand how ?
the only difference that and as i said with 16 gb ram runs 160 site
maxihayat has 37000 active users :D
i could not understand how ?
Ok you got 2 server
(a)one is runinnuing www.maxihayat.net which as 16GB of ram
(B) one is running cpanel 2 gb of ram (wordpress and another website)
now tell me :
for server (a) do you face any problem ?? like memory out or server down ???
for server (a) do you have php process as individuals ??
(a)one is runinnuing www.maxihayat.net which as 16GB of ram
(B) one is running cpanel 2 gb of ram (wordpress and another website)
now tell me :
for server (a) do you face any problem ?? like memory out or server down ???
for server (a) do you have php process as individuals ??
ASKER
the other server is not mine it is one of my friend's and
it has faced with no problem as i said it is running 160+ sites with the same server of maxihayat and as you could see maxi hayat has 37000 active users
i am hosting a few site which has totally maybe 2000 users per day but it get down with 5gb ram, i have tryed with increasing memory, and also my mysql server is remote server , i mean it is not using mem from my server, but maxihayat's server use the mysql with the same server apache.
how this happens there is a huge difference
it has faced with no problem as i said it is running 160+ sites with the same server of maxihayat and as you could see maxi hayat has 37000 active users
i am hosting a few site which has totally maybe 2000 users per day but it get down with 5gb ram, i have tryed with increasing memory, and also my mysql server is remote server , i mean it is not using mem from my server, but maxihayat's server use the mysql with the same server apache.
how this happens there is a huge difference
you saying its "it get down with 5gb ram"
but the picture of the server has only 2 GB of ram
but the picture of the server has only 2 GB of ram
ASKER
i decreased back this is a virtual machine in a i7 machine
if you are up to experiment something then i might be able to help you ..
but without looking into server it would be hard to say anything from here ..
is there any way to rebuild another Virtual mechine..
but this time.. dont use cpanel .. compile apache php and mysql into same pc then put web site one by one , or if you trust me i can do that for you!!!!
it might give some lights ...... ( as i am not familiar of having php process on its own )
but without looking into server it would be hard to say anything from here ..
is there any way to rebuild another Virtual mechine..
but this time.. dont use cpanel .. compile apache php and mysql into same pc then put web site one by one , or if you trust me i can do that for you!!!!
it might give some lights ...... ( as i am not familiar of having php process on its own )
or you can Delete this question and ask again , some php guy might be able to help you on this issue
ASKER
ok it is no problem ,
c.e@salay.com.tr if you send me an empty email i will send you an ssh access to a new virtual machine
please provide me how much ram do you want and cpu thanks
but i will be do this a few hours later thank you
c.e@salay.com.tr if you send me an empty email i will send you an ssh access to a new virtual machine
please provide me how much ram do you want and cpu thanks
but i will be do this a few hours later thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am sorry for the lateness i was out of the city , i will send details thanks
or if your turned on php error reporting.. do you see any error while browsing the site ??
also how much ram you put on php.ini ??
also how did you compile our php with apache ???