Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62727 > unrolled thread

Apache restart after source changes

Started byFredrik Bertilsson <frebe73@gmail.com>
First post2013-12-25 21:57 -0800
Last post2013-12-26 08:26 -0500
Articles 6 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  Apache restart after source changes Fredrik Bertilsson <frebe73@gmail.com> - 2013-12-25 21:57 -0800
    Re: Apache restart after source changes Eduardo A. Bustamante López <dualbus@gmail.com> - 2013-12-25 22:27 -0800
      Re: Apache restart after source changes Fredrik Bertilsson <frebe73@gmail.com> - 2013-12-25 22:36 -0800
        Re: Apache restart after source changes Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-12-26 14:13 +0100
        Re: Apache restart after source changes diverman <pavel@schon.cz> - 2013-12-29 23:32 -0800
    Re: Apache restart after source changes Ned Batchelder <ned@nedbatchelder.com> - 2013-12-26 08:26 -0500

#62727 — Apache restart after source changes

FromFredrik Bertilsson <frebe73@gmail.com>
Date2013-12-25 21:57 -0800
SubjectApache restart after source changes
Message-ID<9e70e719-10f9-4772-8da9-0270538f9fba@googlegroups.com>
I am evaluating Python for web development and just found out that I need to restart Apache after source changes on windows. Using linux the situation is better but I still have to touch the wsgi file. Is it only me that finds this being a major drawback compared to PHP?

[toc] | [next] | [standalone]


#62729

FromEduardo A. Bustamante López <dualbus@gmail.com>
Date2013-12-25 22:27 -0800
Message-ID<mailman.4625.1388039269.18130.python-list@python.org>
In reply to#62727
On Wed, Dec 25, 2013 at 09:57:42PM -0800, Fredrik Bertilsson wrote:
> I am evaluating Python for web development and just found out that I need to restart Apache after source changes on windows. Using linux the situation is better but I still have to touch the wsgi file. Is it only me that finds this being a major drawback compared to PHP?
How is it a «major drawback». «Oh, god, I have to touch that file!
This is unbearable! It's unbeliavable!!! How awful».

Also, it's not a python issue, it's an issue with your particular
stack. Other stacks do automatic reloading (for example, the web
server that Django uses).

-- 
Eduardo Alan Bustamante López

[toc] | [prev] | [next] | [standalone]


#62730

FromFredrik Bertilsson <frebe73@gmail.com>
Date2013-12-25 22:36 -0800
Message-ID<9b851416-a03a-46f7-82c3-20028e05cf37@googlegroups.com>
In reply to#62729
> Also, it's not a python issue, it's an issue with your particular
> stack. Other stacks do automatic reloading (for example, the web
> server that Django uses).

Which web server do you suggest instead of Apache, which doesn't have this problem? (I am not planning to use Django)

[toc] | [prev] | [next] | [standalone]


#62738

FromChris “Kwpolska” Warrick <kwpolska@gmail.com>
Date2013-12-26 14:13 +0100
Message-ID<mailman.4631.1388063630.18130.python-list@python.org>
In reply to#62730
On Thu, Dec 26, 2013 at 7:36 AM, Fredrik Bertilsson <frebe73@gmail.com> wrote:
>> Also, it's not a python issue, it's an issue with your particular
>> stack. Other stacks do automatic reloading (for example, the web
>> server that Django uses).
>
> Which web server do you suggest instead of Apache, which doesn't have this problem? (I am not planning to use Django)
> --
> https://mail.python.org/mailman/listinfo/python-list

It depends.  Some other frameworks (like Flask) also offer auto-reload
in debug mode — auto-reload can be bad for you and is not supported by
production environments, in which uWSGI (in Emperor mode if
possible/makes sense on Windows) and nginx is the best solution
around, and auto-reload isn’t supported (for good reasons, as
mentioned before).
-- 
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

[toc] | [prev] | [next] | [standalone]


#62878

Fromdiverman <pavel@schon.cz>
Date2013-12-29 23:32 -0800
Message-ID<9839594b-9a4e-4fe9-a123-2d8b67a456cd@googlegroups.com>
In reply to#62730
In development environment I suggest to use build-in webserver from wsgiref module, see http://docs.python.org/2/library/wsgiref.html#examples

Then it's easy to run webserver in console and kill&start it with Ctrl+C keystroke. In production environment, use your prefered webserver like apache,nginx etc...

Dne čtvrtek, 26. prosince 2013 7:36:45 UTC+1 Fredrik Bertilsson napsal(a):
> > Also, it's not a python issue, it's an issue with your particular
> 
> > stack. Other stacks do automatic reloading (for example, the web
> 
> > server that Django uses).
> 
> 
> 
> Which web server do you suggest instead of Apache, which doesn't have this problem? (I am not planning to use Django)

[toc] | [prev] | [next] | [standalone]


#62740

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-12-26 08:26 -0500
Message-ID<mailman.4633.1388064426.18130.python-list@python.org>
In reply to#62727
On 12/26/13 12:57 AM, Fredrik Bertilsson wrote:
> I am evaluating Python for web development and just found out that I need to restart Apache after source changes on windows. Using linux the situation is better but I still have to touch the wsgi file. Is it only me that finds this being a major drawback compared to PHP?
>

In general, PHP is more tightly integrated into web servers than Python 
is.  Python's advantages are 1) a more disciplined and carefully planned 
language and standard library, and 2) a larger and broader ecosystem of 
libraries, especially for tasks not directly related to serving web pages.

As to restarting servers after source changes: most people do not change 
file directly on their production servers.  They develop on their own 
machines, test the code, then deploy it to a production server.  In this 
scenario, restarting the web server is not a burden.

I don't know what the options are for auto-restarting the kinds of web 
servers you'd use in production, I'm sure there are some.  Someone here 
mentioned the Django web server, but that isn't intended for production use.

-- 
Ned Batchelder, http://nedbatchelder.com

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web