Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread Nick Kew
On Sun, 2015-10-25 at 15:55 -0700, David Aronchick wrote: > Is it possible (or inadvisable) to run apache using > the /usr/sbin/apache binary directly? Is there any significant > production issues that might arise? Your working shell environment gets inherited by the server. That could be a

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread David Aronchick
FWIW, I went another way here - with apache. Rather than pegging the container to apache running, I used Kubernetes to health check the app, and simply catted out the log files to stdio. It's not really the "docker-way" of one process per container, but it's working pretty well. The idea was

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread Nick Kew
On Mon, 26 Oct 2015 07:33:30 -0700 Kurtis Rader wrote: > I don't understand what the problem is. If you're starting a single-program > to do exactly one task (e.g., server individual HTTP requests serially) That's an unusual use for a general-purpose webserver. However,

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread Kurtis Rader
On Sun, Oct 25, 2015 at 9:09 PM, David Aronchick wrote: > I hadn't thought of the fact that apache would be architected to use its > multiple threads as an internal housekeeping (instead of just to allow > parallelization of requests). > You misunderstood me. I don't know

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread Eric Covener
On Sun, Oct 25, 2015 at 11:17 PM, David Aronchick wrote: > /usr/sbin/apache2 -DFOREGROUND -DNO_DETACH -f /etc/apache2/apache2.conf There's also -DONE_PROCESS. But like the others, it's meant for debugging. I wouldn't turn all of these on to pass some docker/microservices

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread Yehuda Katz
tober 26, 2015 7:34 AM > *To:* users@httpd.apache.org > *Subject:* Re: [users@httpd] Running Apache in Single Process Mode for > Docker Container? > > > > On Sun, Oct 25, 2015 at 9:09 PM, David Aronchick <aronch...@gmail.com> > wrote: > > I hadn't thought of

RE: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-26 Thread DeLeon, Rose L
Please do not email me anymore From: Kurtis Rader [mailto:kra...@skepticism.us] Sent: Monday, October 26, 2015 7:34 AM To: users@httpd.apache.org Subject: Re: [users@httpd] Running Apache in Single Process Mode for Docker Container? On Sun, Oct 25, 2015 at 9:09 PM, David Aronchick <aro

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Nick Kew
On Sat, 2015-10-24 at 21:11 -0700, Kurtis Rader wrote: > > I'm going to assume that by "single process" you meant "single user". If you read the docs, you'll find single process mode described ("httpd -X"). It has nothing to do with single user. I regularly run it in single-process mode for

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread ryo takatsuki
I may be wrong, but I believe you are looking for this (to keep apache attached to the shell): http://zroger.com/blog/apache-in-the-foreground/ You could also take a look at this, as it may already be taking care of what you seem to be looking for:

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread David Aronchick
Thank you, this is very helpful! Is there any way to get an output of all the items on the command line ultimately used by apachectl? For example, when I do the following, it fails - I assume I'm missing something. $ source /etc/apache2/envvars $ /usr/sbin/apache2 -f

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Eric Covener
You probably have envvars set by your init scripts to define a bunch of variables used in sections in your conf. On Sun, Oct 25, 2015 at 10:26 PM, David Aronchick wrote: > Thank you, this is very helpful! Is there any way to get an output of all > the items on the command

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread David Aronchick
Is it possible (or inadvisable) to run apache using the /usr/sbin/apache binary directly? Is there any significant production issues that might arise? On Sun, Oct 25, 2015 at 3:26 PM, David Aronchick wrote: > I appreciate your feedback. I apologize for providing additional

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread David Aronchick
I hadn't thought of the fact that apache would be architected to use its multiple threads as an internal housekeeping (instead of just to allow parallelization of requests). My motivation behind moving the processes to be so low is that I'm trying to explore Apache's suitability for use in a

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Kurtis Rader
On Sun, Oct 25, 2015 at 3:26 PM, David Aronchick wrote: > I appreciate your feedback. I apologize for providing additional context > about my question, I won't do that in the future. > No need to apologize. It just sounded like you were asking for advice about making a

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread David Aronchick
Unfortunately, no joy (this is using apachectl, not /usr/sbin/apache) :( root 339 0.0 0.0 8868 904 ?S+ 02:38 0:00 \_ grep --color=auto apache root 1 0.0 0.0 4448 780 ?Ss Oct25 0:00 /bin/sh /usr/sbin/apache2ctl -DFOREGROUND -DNO_DETACH root

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Kurtis Rader
On Sun, Oct 25, 2015 at 3:55 PM, David Aronchick wrote: > Is it possible (or inadvisable) to run apache using the /usr/sbin/apache > binary directly? Is there any significant production issues that might > arise? > Run the binary directly as opposed to what? If you mean via

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread David Aronchick
Thanks for all the help all! I dug into the apachectl and realized I was using the config file in sites-enabled, instead of the top level /etc/apache2/apache.conf file. The latter file installs all the modules in /mods-enabled, which is what was missing. (for the curious, I also had to copy all

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread David Aronchick
I appreciate your feedback. I apologize for providing additional context about my question, I won't do that in the future. All I'm looking to do is run Apache in single threaded non-forking mode, and output all its output to stdio/stderr. I thought that some folks on this list might have done

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Yehuda Katz
You could try starting the service and run "ps auxf | grep apache". This doesn't always give you all the information, but it could help. - Y On Sun, Oct 25, 2015 at 10:26 PM, David Aronchick wrote: > Thank you, this is very helpful! Is there any way to get an output of all

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Kurtis Rader
On Sun, Oct 25, 2015 at 7:26 PM, David Aronchick wrote: > Thank you, this is very helpful! Is there any way to get an output of all > the items on the command line ultimately used by apachectl? For example, > when I do the following, it fails - I assume I'm missing

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Kurtis Rader
On Sun, Oct 25, 2015 at 8:17 PM, David Aronchick wrote: > Thanks for all the help all! I dug into the apachectl and realized I was > using the config file in sites-enabled, instead of the top level > /etc/apache2/apache.conf file. The latter file installs all the modules in

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-25 Thread Kurtis Rader
On Sat, Oct 24, 2015 at 11:31 PM, Nick Kew wrote: > On Sat, 2015-10-24 at 21:11 -0700, Kurtis Rader wrote: > > I'm going to assume that by "single process" you meant "single user". > > If you read the docs, you'll find single process mode > described ("httpd -X"). It has

[users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-24 Thread David Aronchick
I understand it's not a best practice to run Apache in single process mode for most situations, but what about inside a Docker container? My goal is to have the logs & errors output to stdio/stderr, and to have the entire container get killed if the process dies.

Re: [users@httpd] Running Apache in Single Process Mode for Docker Container?

2015-10-24 Thread Kurtis Rader
On Sat, Oct 24, 2015 at 3:35 PM, David Aronchick wrote: > I understand it's not a best practice to run Apache in single process mode > for most situations, but what about inside a Docker container? > > My goal is to have the logs & errors output to stdio/stderr, and to have