Apache is not for devs
-
Colleague creates a copy of production site for staging. Creates a new virtual host on apache. Basically copies
site.conf
intosite-dev.conf
and changes the directories. Reloads apache.All CPU-s suddenly jump to 100%. The apache process seems to fork itself into infinity. Database, the entire server blocked.
We scramble, quickly figure out this was due to his vhost and disable it.
Phew! So what did he do wrong?
Hmm... the best we can tell... nothing.
We re-enable the host. CPU 100%. Disable it - back to normal.
We play around with disabling
mpm-itk
module for the new vhost. Some good results there, but our app needs to write to disk, so we'd like to keep the per-user forking feature.I start from scratch, and create a whole new vhost
test.conf
. Try it out. It works.I start copying config specifics from the
site-dev.conf
. Set the same hosting directory. It still works. Copy the server url. Works. Copy the mpm-itk config block. Works. Copy the logging setup, works, works, works.The entire content of
test.conf
is now the same assite-dev.conf
. Withsite-dev
, it crashes the server. Withtest
, it just fucking works.On a lark, I rename
site-dev.conf
intosite_dev.conf
.It works.
WHAT THE HELL APACHE!?
For now, we'll just leave it at that, and make a mental note not to name any new virtualenvs like
*-dev.conf
.Anyone here has a clue what could be happening?
-
E_NOREPRO
root@dev1:~# apachectl -v Server version: Apache/2.4.23 (Debian) Server built: 2016-09-29T10:03:31
Granted, I have nothing fancy set up in them:
root@dev1:~# cat /etc/apache2/sites-available/site.conf <VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/var/www/site" ServerName site.local <Directory "/var/www/site"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost>
-
@Onyx If you're up for it, try
site-dev.conf
. And then add mpm-itk module. It's something related to these two, just haven't figured it out 100%.
-
FWIW I have a
server-status.conf
file that sits in my sites enabled folder which runs fine - but I'm stuck with mpm_winnt
-
@Arantor said in Apache is not for devs:
FWIW I have a server-status.conf file that sits in my sites enabled folder which runs fine - but I'm stuck with mpm_winnt
Other dash-files work fine with me. It's just with
x-dev.conf
that it breaks.Haven't tried other combinations. I'll give it a go when I get home.
-
@cartman82 '_' is a valid character for identifiers in most languages where '-' is not? Who knows how something is implemented.
-
Someone at Apache left some kind of debug behaviour in there hooked up to whether they were using a -dev version of the configuration?
Either something that uses a metric f*ckton of resources and crashes with anything remotely resembling a production-like setup, or something that just breaks without something else being as it was when they were debugging?
-
@CarrieVS said in Apache is not for devs:
Someone at Apache left some kind of debug behaviour in there hooked up to whether they were using a -dev version of the configuration?
At the apparent mpm-itk home page:
Quirks and warnings
...
Note that mpm-itk is nowhere as tested as, say, prefork. That being said, it's being run in production at several sites in the world, both hobbyist and commercial, some as large as ~10 million hits a day.
-
@boomzilla said in Apache is not for devs:
At the apparent mpm-itk home page:
Yup. I should probably move things to PHP-FPM, I just never get around to it :/
-
@cartman82 said in Apache is not for devs:
@boomzilla said in Apache is not for devs:
At the apparent mpm-itk home page:
Yup. I should probably move things to PHP-FPM, I just never get around to it :/
You should probably move things to IIS.
-
@Lorne-Kates said in Apache is not for devs:
You should probably move things to IIS.
Hahahahahaha. No.
-
@cartman82 said in Apache is not for devs:
@Lorne-Kates said in Apache is not for devs:
You should probably move things to IIS.
Hahahahahaha. No.
Think again pal; you get to program everything in F# ! Amaze your friends with Functional Programming! Purify your lambdas like no stodgy, corporate object-oriented meta-transpiler could ever let you! Live the Free Unix Way with a modern, bold yet unassuming paradigm that reflects the lifestyle of the Thinking Developer! And all this on forkable-on-GitHub open-source Roslyn!
-
@cartman82 said in Apache is not for devs:
Haven't tried other combinations. I'll give it a go when I get home.
Well I tried reproing this on my debian VM. itk-mpm, same project, name ending with -dev...
Nothing.
I guess it will remain a mystery.
-
@cartman82 said in Apache is not for devs:
I guess it will remain a mystery.
Admit it, your colleague is using Ubuntu server.
-
@Lorne-Kates said in Apache is not for devs:
@cartman82 said in Apache is not for devs:
@boomzilla said in Apache is not for devs:
At the apparent mpm-itk home page:
Yup. I should probably move things to PHP-FPM, I just never get around to it :/
You should probably move things to IIS.
If he did that, instead of dealing with Apache servers, he'd be dealing with a patchy server.
-
@cartman82 said in Apache is not for devs:
@cartman82 said in Apache is not for devs:
Haven't tried other combinations. I'll give it a go when I get home.
Well I tried reproing this on my debian VM. itk-mpm, same project, name ending with -dev...
Nothing.
I guess it will remain a mystery.
Do you have an
include *-dev.conf
somewhere in a config included from that file?
-
This post is deleted!
-
@ben_lubar said in Apache is not for devs:
Do you have an include *-dev.conf somewhere in a config included from that file?
Not that I can find.