httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Duffy <eastcor...@ymail.com.INVALID>
Subject [users@httpd] Re:[users@httpd] Apache Virtualhost Crashing in OpenBSD
Date Fri, 03 Jun 2016 22:46:56 GMT




 Hi there,
My apologies for perhaps not being clear. And I do appreciate your push towards php-fpm as
it is the way forward!!
So, when I say "crash", I mean that requests for the defined virtualhost are suddenly being
directed to the htdocs folder and only restarting Apache restores the virtualhost. If there
is no load on the server then things can remain in good health for many hours. But if there
is load then it can be as low as 2-3 minutes before the virtualhost fails.
My httpd-vhosts.conf is as follows:
<VirtualHost 10.254.254.254:80> ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/www_test/$1
DirectoryIndex /index.php index.php ServerAdmin webmaster@test.blah.net DocumentRoot /var/www/www_test
ServerName test.blah.net ErrorLog logs/www_test-error_log CustomLog logs/www_test-access_log
common <Directory /> Order Deny,Allow Require all granted Deny from all Allow from x.x.x.x/22
Allow from x.x.x.x/22 Allow from x.x.x.x/24 Allow from x.x.x.x/24 </Directory></VirtualHost>
I changed the IP ranges to x.x.x.x for matters of privacy.
My httpd.conf is as per compilation with the following changes:
Added: AddType application/x-httpd-php .phpUncommented: LoadModule proxy_module modules/mod_proxy.so
Uncommented: LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
Uncommented: Include conf/extra/httpd-vhosts.conf
Hopefully this makes it clearer what I mean. 

    On Friday, 3 June 2016, 23:11, "Houser, Rick" <rick.houser@jackson.com> wrote:
 

 #yiv6672224777 -- filtered {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;}#yiv6672224777
filtered {panose-1:2 4 5 3 5 4 6 3 2 4;}#yiv6672224777 filtered {font-family:Calibri;panose-1:2
15 5 2 2 2 4 3 2 4;}#yiv6672224777 p.yiv6672224777MsoNormal, #yiv6672224777 li.yiv6672224777MsoNormal,
#yiv6672224777 div.yiv6672224777MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6672224777
a:link, #yiv6672224777 span.yiv6672224777MsoHyperlink {color:blue;text-decoration:underline;}#yiv6672224777
a:visited, #yiv6672224777 span.yiv6672224777MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6672224777
p.yiv6672224777msonormal, #yiv6672224777 li.yiv6672224777msonormal, #yiv6672224777 div.yiv6672224777msonormal
{margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6672224777 p.yiv6672224777msochpdefault,
#yiv6672224777 li.yiv6672224777msochpdefault, #yiv6672224777 div.yiv6672224777msochpdefault
{margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv6672224777 span.yiv6672224777msohyperlink
{}#yiv6672224777 span.yiv6672224777msohyperlinkfollowed {}#yiv6672224777 span.yiv6672224777emailstyle17
{}#yiv6672224777 p.yiv6672224777msonormal1, #yiv6672224777 li.yiv6672224777msonormal1, #yiv6672224777
div.yiv6672224777msonormal1 {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6672224777
span.yiv6672224777msohyperlink1 {color:#0563C1;text-decoration:underline;}#yiv6672224777 span.yiv6672224777msohyperlinkfollowed1
{color:#954F72;text-decoration:underline;}#yiv6672224777 span.yiv6672224777emailstyle171 {color:#1F497D;}#yiv6672224777
p.yiv6672224777msochpdefault1, #yiv6672224777 li.yiv6672224777msochpdefault1, #yiv6672224777
div.yiv6672224777msochpdefault1 {margin-right:0in;margin-left:0in;font-size:10.0pt;}#yiv6672224777
span.yiv6672224777EmailStyle27 {color:#1F497D;}#yiv6672224777 .yiv6672224777MsoChpDefault
{font-size:10.0pt;}#yiv6672224777 filtered {margin:1.0in 1.0in 1.0in 1.0in;}#yiv6672224777
div.yiv6672224777WordSection1 {}#yiv6672224777 My suggestion of moving your php infrastructure
outside of the Apache was partially since it’s an overall better/safer architecture, and
partially to bisect a likely cause of your problem.  Now that you have completely removed
mod_php from httpd, you know for a fact your crash is not PHP related.    I admit that I
don’t quite understand what you mean by your problem description.  As virtual hosts don’t
run, they can’t crash.  I suspect something else is going on with your configuration, but
only a small subset was provided.  Any chance you could narrow it down to a minimal configuration
set that triggers this problem (perhaps try removing all other vhosts, confirm you can reproduce
the behavior, take out all modules you don’t need for the reduced set, and confirm the problem
persists), provide an exact description of what’s happening symptom-wise, and then supply
a complete copy of your configuration?  Something might stand out.    Depending on the failure
mode you have, you might be able to get a core dump, run in single-threaded debug mode, etc. 
If you actually have to debug a multi-threaded process, I’m definitely not the right person
to ask (only written three modules back in the 2.0/2.2 era, and struggling myself with memory
leaks in a third-party module).       Rick Houser Web Administration    From: James Duffy
[mailto:eastcork75@ymail.com.INVALID]
Sent: Friday, June 03, 2016 16:58
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache Virtualhost Crashing in OpenBSD    Hi there Rick,    I
recompiled php to run as an fpm daemon. Got it all running using the fpm-server and after
a few hours Apache vitrualhost has crashed again. Though I welcomed your suggestion to get
me out of a fix (which sadly didn't work) it is not a good thing if Apache can be crashed
in the first place.    Restarting Apache clears the problem until it falls over again.   
How do I progress this? Is there a way of taking a snapshot of Apache in its crashed state
to send to the developers?    Thanks    On Wednesday, 1 June 2016, 14:21, "Houser, Rick"
<rick.houser@jackson.com> wrote:    Have you tried php-fpm?  That lets you isolate
the php code from the apache process and avoid all the thread compatibility issues, memory
leaks, etc. from php, yet still run moderm mpms like worker or event.   Rick Houser Web Administration
  From: James Duffy [mailto:eastcork75@ymail.com.INVALID]
Sent: Wednesday, June 01, 2016 07:47
To: users@httpd.apache.org
Subject: [users@httpd] Apache Virtualhost Crashing in OpenBSD   Hi there,   I am running
the latest OpenBSD v5.9 and the official Apache package has a problem where all defined virtualhosts
crash after a short period of time -  normally when the server comes under load. So I compiled
the latest version 2.4.20 and this still does the same. I have changed very little of the
default config. I am running php if this makes any difference though I assume it is still
an Apache bug if php can crash it like this. Once the virtualhost has crashed all requests
default to the htdocs folder.   My virtualhost config looks like this - though as it works
for a while I don't see this being a config error as such.   <VirtualHost 10.254.254.254:80>
ServerAdminwebmaster@test.blah.net DocumentRoot /var/www/www_test ServerName test.blah.net
ErrorLog logs/www_test-error_log CustomLog logs/www_test-access_log common <Directory />
Order Deny,Allow Require all granted Deny from all                 Allow from 10.0.0.0/8
Allow from 193.105.253.0/24 </Directory> </VirtualHost>   Any help or comments
appreciated.    

   

  
Mime
View raw message