LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2019, 09:59 AM   #1
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Rep: Reputation: Disabled
Apache webserver on CentOS7 hanging from processes


systemctl status httpd shows about 100 of these and still shows running, although sites are timing out. restarting the server clears it but I don't want to do that nightly. tried just restarting apache but was taking forever.

CGroup: /system.slice/httpd.service
├─ 8499 /usr/sbin/httpd -DFOREGROUND
├─ 8788 /usr/sbin/httpd -DFOREGROUND
├─11803 /usr/sbin/httpd -DFOREGROUND
├─12028 /usr/sbin/httpd -DFOREGROUND
├─12068 /usr/sbin/httpd -DFOREGROUND
├─12077 /usr/sbin/httpd -DFOREGROUND
├─12079 /usr/sbin/httpd -DFOREGROUND
├─12080 /usr/sbin/httpd -DFOREGROUND
├─12087 /usr/sbin/httpd -DFOREGROUND
 
Old 07-10-2019, 10:21 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
We need more information to help, I think.
What do you mean by restarting apache "taking forever"? How long is "forever"?
How many sites are on the server?
When things are timing out, what does
Code:
netstat -tnp | grep 80
show? (grep for 443 instead if sites are using https) That is, how many IPs are connected to the web server?
 
Old 07-10-2019, 11:09 AM   #3
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Original Poster
Rep: Reputation: Disabled
The server is serving 12 sites. We only have 1 external IP pointing to the server. I let it try restarting apache for over a minute until canceling and rebooting. Not sure what netstat shows, I rebooted before checking. I'll do that if it happens again. It was working fine until that point and after rebooting.

There was an external server that had a website mounted in /etc/fstab that went down. Possibly that?

Currently netstat shows:
[root@webserver]# netstat -tpn | grep 443
tcp 0 0 dmz.ip.address:47868 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47876 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47855 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47822 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47834 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47866 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47878 external.ip.address:443 TIME_WAIT -
tcp 0 0 dmz.ip.address:47833 external.ip.address:443 TIME_WAIT -

[root@webserver]# netstat -tpn | grep 80
tcp 0 0 dmz.ip.address:80 external.ip.address:57307 SYN_RECV -
tcp 0 0 storage.ip.address:807 storage.ip.address:2049 ESTABLISHED -
 
Old 07-10-2019, 11:16 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
There was an external server that had a website mounted in /etc/fstab that went down. Possibly that?
What? I don't understand.

Also, look in the httpd logs to see who's requesting what from the server at the time of the slowdown/freeze.
 
Old 07-10-2019, 12:17 PM   #5
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Original Poster
Rep: Reputation: Disabled
All the sites that are served from the webserver are mounted on the webserver from somewhere else. Mostly from a SAN but also from a couple other servers.

[Tue Jul 09 14:49:41.111659 2019] [mpm_prefork:notice] [pid 2418] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Jul 09 14:49:42.279250 2019] [suexec:notice] [pid 2741] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jul 09 14:49:42.286711 2019] [ssl:warn] [pid 2741] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Jul 09 14:49:42.331639 2019] [auth_digest:notice] [pid 2741] AH01757: generating secret for digest authentication ...
[Tue Jul 09 14:49:42.332197 2019] [lbmethod_heartbeat:notice] [pid 2741] AH02282: No slotmem from mod_heartmonitor
[Tue Jul 09 14:49:42.339161 2019] [ssl:warn] [pid 2741] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Jul 09 14:49:42.368219 2019] [mpm_prefork:notice] [pid 2741] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 SVN/1.7.14 PHP/7.2.19 configured -- resuming normal operations
[Tue Jul 09 14:49:42.368250 2019] [core:notice] [pid 2741] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

Those errors and php errors are the only ones in the error_logs
 
Old 07-10-2019, 01:09 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Activity is in the access_logs, not the error_logs. That would show you who is requesting what. Look specifically at/around the time of the slowdown/freeze.

Given that the content is remote to the web server, I'd suspect a communication issue there. The logs will help narrow that down.

A problem in that communication could also account for the slowness of a restart.
 
1 members found this post helpful.
  


Reply

Tags
apache 2.4.7, centos7, httpd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any problem if I install CENTOS7 Workstation over CENTOS7 Server? Rich Strebendt Linux - Software 5 05-03-2018 11:05 PM
apache processes hanging on futex sean.simpson Linux - Server 0 06-15-2012 07:18 PM
My webserver stuck very often because of httpd processes duzap Linux - Server 2 07-17-2011 08:40 AM
Accessing an Internal Webserver from my Public Webserver rtoney5 Linux - Server 1 12-18-2009 05:41 PM
Can't see WebServer from outside... Can see WebServer locally as http://localhost friddick Linux - Networking 13 08-19-2003 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration