Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Apache taking 100% of the cpu

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
flambert
Posts: 2
Joined: Sun Jan 19, 2020 12:27 pm

Os: Ubuntu 16x
Web: apache + nginx
Apache taking 100% of the cpu
  • Quote

Post by flambert » Sun Jan 19, 2020 12:39 pm

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?
Top

makispain
Posts: 19
Joined: Thu Apr 25, 2019 10:19 am

Os: CentOS 6x
Web: apache + nginx
Re: Apache taking 100% of the cpu
  • Quote

Post by makispain » Wed Jan 22, 2020 8:58 am

Something similar happened to me with the Clamav.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Apache taking 100% of the cpu
  • Quote

Post by skamasle » Wed Jan 22, 2020 8:20 pm

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 ?
Top

flambert
Posts: 2
Joined: Sun Jan 19, 2020 12:27 pm

Os: Ubuntu 16x
Web: apache + nginx
Re: Apache taking 100% of the cpu
  • Quote

Post by flambert » Sat Jan 25, 2020 8:42 am

skamasle wrote: ↑
Wed Jan 22, 2020 8:20 pm
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 ?
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
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Apache taking 100% of the cpu
  • Quote

Post by skamasle » Tue Jan 28, 2020 7:34 pm

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
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password