Php Process Cpu Spike
Mar 24, 2008Is it normal for PHP to spike in cpu usage often? Which setting in php.ini can affect the cpu usage?
View 6 RepliesIs it normal for PHP to spike in cpu usage often? Which setting in php.ini can affect the cpu usage?
View 6 RepliesIs there a method for tracking events prior to severe server load? I get these load spikes and am trying to track down their cause ..
OS: CentOS
I just moved my site from other VPS hosting into Liquid Web for around 2weeks now. I choose the VPS1 package with WHT promotion..
First impression, I do really satisfied with the VPS performance (server load average bellow 1), also the support team. All of my eMail was replied pretty fast in under 15minutes.
But, I do have one problem. Please note that I'm not complaining here.. I just want to ask other user of LW or maybe other hosting.
Almost everyday (well, I think it is).. I got a load spike on my VPS. It's always around midnight (GMT -5). Based on LW staff have informed me, it's because of the main node full backup process, which is can't be altered. The load spike make my site sometimes temporary can't be accessed, because the server load might become above 5, and the highest one is around 28.
Do WHT user has any similar issue like me? Any solution or suggestion I can take to minimize the effect of the backup process?
Just few mins ago, my site went down so I went to check up through putty, and when i put Top this is what i got:
top - 09:49:35 up 5 days, 14:41, 2 users, load average: 192.59, 109.31, 62.29
Tasks: 299 total, 3 running, 296 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.0% us, 5.3% sy, 0.0% ni, 0.0% id, 88.7% wa, 0.3% hi, 1.7% si
Mem: 1009272k total, 1001268k used, 8004k free, 124k buffers
Swap: 3919840k total, 1518816k used, 2401024k free, 14676k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14263 apache 17 0 201m 9m 3788 D 1.0 1.0 0:04.74 httpd
16772 apache 17 0 152m 13m 5340 R 1.0 1.4 0:00.82 httpd
16881 apache 16 0 155m 14m 5368 D 1.0 1.4 0:00.52 httpd
16767 apache 16 0 154m 14m 5352 D 0.7 1.4 0:00.48 httpd
16864 apache 16 0 155m 15m 5364 D 0.7 1.6 0:00.80 httpd
16874 apache 17 0 155m 14m 5416 D 0.7 1.4 0:00.60 httpd
8900 apache 17 0 200m 12m 3844 D 0.3 1.3 0:10.60 httpd
13680 apache 17 0 202m 10m 3944 D 0.3 1.0 0:06.05 httpd
14687 apache 17 0 202m 11m 4060 D 0.3 1.2 0:06.12 httpd
14838 apache 16 0 206m 16m 5624 D 0.3 1.6 0:08.19 httpd
15858 apache 17 0 152m 13m 5452 D 0.3 1.4 0:01.39 httpd
16593 apache 17 0 150m 9180 3664 D 0.3 0.9 0:00.49 httpd
16668 apache 17 0 200m 7304 3496 D 0.3 0.7 0:00.72 httpd
16703 apache 17 0 149m 7208 3192 D 0.3 0.7 0:00.61 httpd
16750 apache 17 0 151m 14m 5268 D 0.3 1.5 0:00.81 httpd
16855 apache 17 0 200m 6616 3480 D 0.3 0.7 0:00.68 httpd
16863 apache 17 0 156m 13m 5500 D 0.3 1.3 0:00.61 httpd
But after few mins, the server load went down to 5 What could've caused the huge server overload problem?
Server spec:
64 3500+
1Gb of Ram
I have a cpanel, centos server that had to be rebooted due to the high load spike. I was unable to ssh in nor enter whm prior to the reboot so my only option was of course to reboot the server.
Now, I'm trying to trace the cause of the spike. RTG graphs show no indication of a ddos attack.
Inside whm, CPU/Memory/MySQL Usage shows no reds nor yellow warnings either except red for gzip (backup process) at 19% CPU. I doubt this is the cause.
This is from /var/log/messages of the logs slightly before and after the reboot.
Code:
Apr 9 13:31:49 server pure-ftpd: (?@70.250.201.162) [INFO] Logout.
Apr 9 13:32:05 server pure-ftpd: (?@xxx.xxx.85.3) [INFO] New connection from xxx.xxx.85.3
Apr 9 13:32:28 server pure-ftpd: (?@xxx.xxx.85.3) [INFO] New connection from xxx.xxx.85.3 .......
The company I work for is doing a promotional site that will probably involve a good chunk of progressive (as in, not quite the same as streaming) video -- basically my best guess is that everyone who views the site will likely download between 6 and 50 megabytes of video depending on how long they spend on the site, etc... I would imagine most people would be at the low end of that, maybe 12 megs, but it's hard to predict...
The tough spot is there will be TV and banner ads purchased for this promotion, and it's not entirely clear to us how good response will be. It could be 5,000 visitors in a day ... it could be 250,000 in a day... the response to various advertising campaigns our clients have done has just varied a lot...
So let's say we have 150,000 visitors downloading an average of 12.5 megs of video - that's about 2 terabytes of transfer in a month.
How much should we expect to pay for that kind of data transfer, and are there good providers that will scale with us? I don't think we mind sacrificing a few hundred bucks our first month only to find that traffic was low -- but if it's going to cost thousands to move 2-3 terabytes of data via a CDN, what are our other options? Does anyone scale well even if it's unpredictable? I realize we have to pay some sort of premium for that scalability or it's not really fair to the hosting provider.. but what price range should we be looking at?
I have a shared server (root access) using Cpanel / Centos with suphp enabled.
Twice this week the sever's load skyrocketed and was unable to login to trace teh cause, had to reboot instead.
After reboot, I went to whm > CPU/Memory/MySQL Usage and saw nothing in red aside netstat (21% cpu). I'm not sure if this is the cause, but how can I trace the absolute user or script causing this spike?
We have many process under nobody user, so our server load is Very high and its not good.
Here is our server log about one of this process:
Code:
Time: Mon Apr 13 11:36:33 2009 +0430
PID: 4415
Account: nobody
Uptime: 25532 seconds
Executable:
/usr/local/lsws/bin/lshttpd.4.0
Command Line (often faked in exploits):
i have always this process in my server ;
Code:
2 root RT 0 0 0 0 S 0 0.0 0:00.02 migration/0
3 root 34 19 0 0 0 S 0 0.0 0:00.08 ksoftirqd/0
4 root RT 0 0 0 0 S 0 0.0 0:06.43 migration/1
5 root 34 19 0 0 0 S 0 0.0 0:00.31 ksoftirqd/1
6 root RT 0 0 0 0 S 0 0.0 0:05.22 migration/2
7 root 34 19 0 0 0 S 0 0.0 0:00.82 ksoftirqd/2
8 root RT 0 0 0 0 S 0 0.0 0:01.41 migration/3
9 root 34 19 0 0 0 S 0 0.0 0:00.08 ksoftirqd/3
what doeas mean , and for wich application are this proccess
How can track and follow a process id.
For example i need to know what is following process:
14764 root 39 15 11712 9.8m 1668 R 20 0.1 0:14.22 perl
I need to know wich/where file used perl with process id 14764
I am noticing that the kacpid process causing high cpu load.
What does kacpid do? Is there a way to fix for this problem?
Quote:
# ps aux|grep kacpid
root 29 59.6 0.2 0 0 ? S< 22:13 42:20 [kacpid]
Quote:
# lsof -p 29
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
kacpid 29 root cwd DIR 8,2 4096 2 /
kacpid 29 root rtd DIR 8,2 4096 2 /
kacpid 29 root txt unknown /proc/29/exe
Quote:
# ls -l /proc/29/exe
/bin/ls: cannot read symbolic link /proc/29/exe: No such file or directory
lrwxrwxrwx 1 root root 0 Oct 30 22:13 /proc/29/exe
Quote:
# uname -r
2.6.18-164.el5PAE
Ive recently installed installed and configured stuff on my new box but after, I realised abnormal memory usage.
Mysql server is taking 256mb, there are somewhere between 6 and 10 apache process taking up at least 40mb each.
Furthermore, when I do: top, I see that the memory usage is increasing by about 120ko each 3 sec.
I am running centos 5.1 and have a load of 0. Basically, there is no one on the server appart from me.
On the server I have at home running debian, I run all thoose thing and it take up 200mb
max.
write me a daemon that will run every 10 seconds.
If <process> has failed or run into issues, restart the process and then email me with details.
After installing LiteSpeed on my server with cPanel, a few processes have been having issues.
<process> = /opt/lsws/bin/lshttpd, pureftpd, named
I'd like to put up here a base question which I hope some will have the goodwill to answer even though it might touch some business secrecies.
We're a gameserver hoster since around ten years, running also vserver products since over two years now. Renting a few Racks in Europe since some time we're a bit in a question mark how rootserver companies deal with the initial hardware costs for every new customer.
Rackspace and today specially power costs are huge cash eaters here in Europe. Dedicated Rootservers are huge space & power consumers per customer ratio. The initial Hw costs for every new rootserver customer might be covered after 4-6 months (if the machine has to be bought newly), adding the bandwidth and power costs it might take up to 8-9 months until a benefit might come in.
Is this the business normality in the rootserver market (waiting 9 months for any benefit, or counting only on the benefit of the 2nd customer using the older Hw), or are the better ways to handle those "initial" costs or keep them affordably low?
I am showing hundreds of running processes for:
/usr/local/apache/bin/httpd -DSSL
In My server i Can see lotz of /usr/local/apache/bin/httpd -k start -DSSL Process also some time it lead to crash of my server,is this caused to improper httpd.con file iam have 200-250 online users here i will give my apachi cofig file
KeepAlive Off
MaxKeepAliveRequests 200
KeepAliveTimeout 15
StartServers 20
MinSpareServers 30
MaxSpareServers 40
MaxClients 600
MaxRequestsPerChild 250
in correct optimization for my apachi also my processer is dual xenon
Whats is following peocess?
2011 root 0 -20 0 0 0 S 1 0.0 0:38.52 loop0
how to sort this?
Top Process %CPU 98.9 ./dialog --clear --backtitle Zend Optimizer Installation --title Zend Optimizer 3.2.2 --msgbox ?Welcome to the Zend Optimizer 3.2.2 Installation!??For more information regarding this procedure, please see the?Zend Optimizer Installation Guide.? 0 0
Top Process %CPU 98.8 ./dialog --clear --backtitle Zend Optimizer Installation --title Zend Optimizer 3.2.2 --msgbox ?Welcome to the Zend Optimizer 3.2.2 Installation!??For more information regarding this procedure, please see the?Zend Optimizer Installation Guide.? 0 0
My hosting company is telling me that I have getting frozen processes on my VPS that is causing apache to stop responding.
My VPS is CentOS, with 512 megs of memory and my website is a Vbulletin forum. I have several add-ons installed on vbulletin, and if one of those are causing the problem, how do I figure it out?
When http stops responding, I can access the server with putty on ssh. Running the "top" command, it shows that I still have 100+ megs of memory free and the processor is barely being used.
This has happened twice in just 2 - 3 days. This morning, I asked my hosting company what can be causing this, but no answer so far.
I run a dedicated server, Running
CentOS 4.5 final
Apache 2.0.59
php 4.3.11
MySQL 4.1.20
I have a user who has been importing large sql databases and this causes the cpu to run at 80% - 90% this in turn causes high loads and sometimes causing the server to crash.
Is there a way to automatically limit or control how much the process can use or stop the process to allow the server to recover.
Just trying to put some sort of safe guard in place
How do I trace what user this is?
Code:
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 9488 nobody 25 0 1612 1280 1108 S 21.1 0.2 619:37 1 perl bodyb3 200.101.193.42 0 5000
I also ran netstat -n and found this:
Code:
udp 15184 0 server.host.com:55936 ns1.datacenter.net:domain ESTABLISHED
I am having only 14 connections, but having many httpd processes.
root@server [~]# pidof httpd
1544 1498 1475 1239 835 686 684 572 570 535 478 32602 32601 32597 32544 32106 32 085 32082 30538 30536 29612 28981 28980 28978 28785 28778 28775 28759 28741 2843 4 28431 28428 28420 28394 28192 28116 27782 27694 27693 27692 27442 27399 27299 27288 27276 27262 27257 27252 27248 27146 27043 26970 26486 26385 26049 26023 25 703 25679 25621 24603 24602 24600 24526 22025 21963 21950 21915 21870 21858 2179 4 21697 21673 21525 21223 21211 21001 20784 20783 20780 20721 20713 20704 20696 20613 20605 20603 20179 19909 19718 19711 19530 19463 19462 19460 19456 19424 19 346 19283 19258 19232 19140 19123 19088 17926 17925 17924 17421 17420 17419 1505 4 15053 15052 14854 14676 14458 14457 14439 14343 14342 14340 14336 14267 14189 13899 13880 10021 10016 10014 10012 10011 10000 9999 9992 9991 9990 9989 9988 99 86 9979 9978 9977 9976 9973 9972 9970 9962 9961 9960 9959 9957 10293
root@server [~]# netstat -n | grep :80 | wc -l
14
We are using FreeBsd with Cpanel.
Some one has upload some scripts,they are running and attacking
to other systems.
last pid: 64017; load averages: 59.59, 60.75, 63.04 up 19+22:52:28 12:03:45
457 processes: 61 running, 315 sleeping, 81 zombie
CPU states: 52.4% user, 0.0% nice, 47.6% system, 0.0% interrupt, 0.0% idle
Mem: 465M Active, 212M Inact, 236M Wired, 22M Cache, 111M Buf, 62M Free
Swap: 2048M Total, 458M Used, 1590M Free, 22% Inuse
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
3282 root 128 0 37536K 30520K RUN 3:49 4.79% 4.79% perl
62953 root 128 0 30284K 25248K RUN 0:05 1.90% 1.90% perl
49249 root 128 0 33720K 28876K RUN 0:46 1.86% 1.86% perl
2981 root 128 0 40928K 30724K RUN 3:56 1.56% 1.56% perl
76809 nobody 127 0 4148K 2080K RUN 13:52 1.42% 1.42% perl5.8.8
19633 nobody 127 0 4148K 2128K RUN 2:34 1.42% 1.42% perl5.8.8
57451 nobody 126 0 4148K 2072K RUN 39:24 1.22% 1.22% perl5.8.8
76599 nobody 126 0 4148K 2080K RUN 13:53 1.22% 1.22% perl5.8.8
76966 nobody 126 0 4148K 2080K RUN 14:01 1.17% 1.17% perl5.8.8
60286 nobody 126 0 4148K 2072K RUN 38:42 1.12% 1.12% perl5.8.8
77488 nobody 126 0 4148K 2080K RUN 13:48 1.12% 1.12% perl5.8.8
77697 nobody 126 0 4148K 2080K RUN 13:47 1.12% 1.12% perl5.8.8
56573 nobody 126 0 4148K 2096K RUN 39:55 1.07% 1.07% perl5.8.8
58126 nobody 126 0 4148K 2072K RUN 39:11 1.07% 1.07% perl5.8.8
76513 nobody 126 0 4148K 2080K RUN 13:58 1.07% 1.07% perl5.8.8
76807 nobody 126 0 4148K 2080K RUN 13:57 1.07% 1.07% perl5.
I can't remember the name of the utility that lets you watch what a process is doing. You call it on a PID and you can see all the memory allocations, file IO, library loading, etc. that the process is doing as it happens. Anyone know what I'm thinking of?
View 2 Replies View RelatedHow can see wich vps used more server resource in openvz/hypervm.
View 3 Replies View RelatedHow to stop lfd mail from csf as Suspicious process running under user and Excessive resource usage?
View 7 Replies View RelatedMy dedicated machine (Quad core, 8gb ram running Debian stable latest + Apache2) is giving me a real hard time.
I got a long running php script (a crawler) that takes long to run and keep getting killed.
The code already have max_execution_time set to -1 (also tried 90000) and max_input_time + max_memory set to -1 (meaning no limit).
I run it in shell with nice set to 19 (!) to ensure the OS don't kill it:
>> nice --adjust=19 /usr/bin/php -f crawl.php
And always, at the same time (after 10 mins or so) it get "Killed".
I can't trim down the code as the crawl is dynamic (from link to link).
how I can save the php from getting "killed"?
I'd like a brief explanation of the process of creating a web site.
Once I sign up, how do I actually construct/configure the web site. Are there templates that I change the colours, background and text of? I don't want to actually construct my own web pages. I just want to "brand/personalize" some template and then let it operate. (And if I'm using some ambiguous terms, please correct me.)
Also, I wanted to know if hosting companies allow one to experiment with an "offline" web site; one that I can set up and play with (via a password or such) using their templates until I have a better idea of what I want or what I can do in terms of presentation (perhaps a month?). Once that's done, I wanted the ability to cancel the whole idea or put what I have on line.
To provide some other info:
I am looking for a shared account, and I understand that bandwidth and disk space are the key requirements, but thanks for the reminder. I have heard about some tools, but for the time being let's just talk about process.
I'm running centOS 5 and I have a java process, it runs from the main IP. The Java process communicates with an external server, this server only allows 2 connections per IP. I have this process running twice on the main IP, therefore using both the single IP connections. My server has multiple IPs and I want to run another copy of this java process from another IP.
View 6 Replies View RelatedWhats following process (owner: 32004)
18689 32004 0
1.6
0.1 /usr/local/cpanel/3rdparty/bin/php-cgi -c /usr/local/cpanel/3rdparty/etc/phpmyadmin /usr/local/cpanel/base/3rdparty/phpMyAdmin/index.php