[fcgi.py] Force cache upgrade?

Discussion in 'Python' started by Gilles, Sep 28, 2012.

  1. Gilles

    Gilles Guest

    Hello

    Does someone know if something must be done after editing a FastCGI +
    WSGI script so that the changes will show in the browser immediately
    instead of having to wait X minutes?

    ===========
    #!/usr/bin/env python2.6

    def myapp(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    return ['I CHANGED THIS\n']

    if __name__ == '__main__':
    from flup.server.fcgi import WSGIServer
    WSGIServer(myapp).run()
    ===========

    I guess the FastCGI server (Flup) only updates its cache every so
    often. Do I need to type a command to force Flup to recompile the
    Python script?

    Thank you.
    Gilles, Sep 28, 2012
    #1
    1. Advertising

  2. Gilles

    Gilles Guest

    On Fri, 28 Sep 2012 23:57:14 +0200, Gilles <> wrote:
    >I guess the FastCGI server (Flup) only updates its cache every so
    >often. Do I need to type a command to force Flup to recompile the
    >Python script?


    Turns out that, yes, mod_fcgid is configured to reload a script only
    after some time or some number of hits, and yes, mod_fcgid settings
    are off-limit on a shared host.
    Gilles, Sep 29, 2012
    #2
    1. Advertising

  3. Gilles wrote:
    > On Fri, 28 Sep 2012 23:57:14 +0200, Gilles <> wrote:
    >> I guess the FastCGI server (Flup) only updates its cache every so
    >> often. Do I need to type a command to force Flup to recompile the
    >> Python script?

    >
    > Turns out that, yes, mod_fcgid is configured to reload a script only
    > after some time or some number of hits,


    Well, that's the whole point of using FastCGI:
    Have a long-running process for better performance.

    Ciao, Michael.
    Michael Ströder, Oct 5, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sam
    Replies:
    3
    Views:
    2,339
    Joerg Jooss
    Mar 8, 2006
  2. benny
    Replies:
    6
    Views:
    133
    Dick Davies
    Apr 25, 2005
  3. Javier Abaroa

    fcgi or ruby-fcgi on Windows-Xp

    Javier Abaroa, Apr 16, 2010, in forum: Ruby
    Replies:
    2
    Views:
    351
    Javier Abaroa
    Apr 19, 2010
  4. Replies:
    5
    Views:
    274
    Dr.Ruud
    Jul 5, 2006
  5. Nospam
    Replies:
    0
    Views:
    98
    Nospam
    Mar 18, 2008
Loading...

Share This Page