Re:[users@httpd] Apache Virtualhost Crashing in OpenBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 







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@xxxxxxxxxxxxx
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 .php
Uncommented: 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@xxxxxxxxxxx> wrote:


 
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@xxxxxxxxx.INVALID]
Sent: Friday, June 03, 2016 16:58
To: users@xxxxxxxxxxxxxxxx
Subject: Re: 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@xxxxxxxxxxx> 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@xxxxxxxxx.INVALID]
Sent: Wednesday, June 01, 2016 07:47
To: users@xxxxxxxxxxxxxxxx
Subject: 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>
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.
 





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux