Apache taking 100% of the cpu
Apache taking 100% of the cpu
Hey all,
My vestacp server takes 100% cpu after around 3 days and get unusable/unresponsible. I haved tried to use strace to trace the issue but having had any luck finding out what is causing the issue.
Strace spamming this:
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
Does anyone have any ideas what I could try?
My vestacp server takes 100% cpu after around 3 days and get unusable/unresponsible. I haved tried to use strace to trace the issue but having had any luck finding out what is causing the issue.
Strace spamming this:
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
read(39, "", 13160) = 0
poll([{fd=39, events=POLLIN}], 1, 3000) = 1 ([{fd=39, revents=POLLHUP}])
Does anyone have any ideas what I could try?
Re: Apache taking 100% of the cpu
Something similar happened to me with the Clamav.
Re: Apache taking 100% of the cpu
What system you use
How much memory have your server
You use fastcgi or mod_php?
Are you sure this is a apache problem and not php problem ?
How much memory have your server
You use fastcgi or mod_php?
Are you sure this is a apache problem and not php problem ?
Re: Apache taking 100% of the cpu
Hey, I am not sure if it's an apache problem or php, I am running around 3 websites, all is not that much used/visitors.
I just see if I go to the server tab under processes that *"apache2" is under 100% load
System::
Ubuntu 16.04
4GB ram
systemd-+-2*[agetty]
|-apache2---8*[apache2]
|-clamd---{clamd}
|-cron
|-dovecot-+-anvil
| |-auth
| `-log
|-exim4---4*[exim4]
|-fail2ban-server---12*[{fail2ban-server}]
|-freshclam
|-kthreadd/102512---khelper/1025129
|-mysqld---28*[{mysqld}]
|-named---4*[{named}]
|-nginx---3*[nginx]
|-proftpd
|-rsyslogd-+-{in:imuxsock}
| `-{rs:main Q:Reg}
|-saslauthd---saslauthd
|-spamd---2*[spamd child]
|-sshd
|-systemd-journal
|-systemd-udevd
|-vesta-nginx---vesta-nginx
|-vesta-php-+-vesta-php
| `-vesta-php---sh---sudo---v-list-sys-cpu----pstree
`-xinetd
Re: Apache taking 100% of the cpu
Try change your PHP handler in your vesta panel
Choose fastcgid this will run apache process and php process in diferente users, so you can see better who is using cpu
By default php runing in vesta as apache process, so you see same process for bot as apache or www-data or nobody
Change PHP handler in tree site one by one, first one and see what happen, you can identify what site is using more CPU
Choose fastcgid this will run apache process and php process in diferente users, so you can see better who is using cpu
By default php runing in vesta as apache process, so you see same process for bot as apache or www-data or nobody
Change PHP handler in tree site one by one, first one and see what happen, you can identify what site is using more CPU