Re: Apache mod_rewrite/RewriteMap prg: and perl script

From: Jeffrey Silverman (jeffrey_at_jhu.edu)
Date: 07/29/03

  • Next message: scriptOmatic: "Re: named.hosts nameserver listing format"
    Date: Mon, 28 Jul 2003 18:17:47 -0400
    
    

    On Mon, 28 Jul 2003 14:19:53 -0700, Joachim Ring wrote:

    >> I am using mod_rewrite to map username's last names to their row_id in my
    >> person database. The Perl script I am using to do this *works* I have
    >> tested it. It follows the KISS design philosphy.
    >>
    >> example I/O session with this script:
    >> # ./facmap.pl
    >> userlastname<ENTER>
    >> 53
    >>
    >> It spits out the row_id if it gets a valid last name.
    >
    > what does it do if you give it thousands of valid and invalid last
    > names?
    > and what happens if you start the script and leave it running whith no
    > input for some hours and then go on (especially if the database is on
    > a remote box - tcp connection might have gone dead for whatever
    > reason)?
    > remember this one script instance is running _all the time_ and if it
    > blocks, so does your rewrite-map, so just testing once or twice is not
    > really sufficient...
    >
    >> * I upgraded the server software recently as follows:
    >> * Apache 1.3.23 -> 1.3.27
    >> * PHP 4.3.1 -> 4.3.2
    >> * MySQL 3.23.23 (?) -> 2.23.56
    >> * RHL 7.2 -> RHL9
    >> I mention these upgrades because I had the same basic rewrite rules
    >> before the upgrade and they never seemd to get munged.
    >> * I tried adding a RewriteLock directive but it did not seem to help.
    >
    > how is the database when the lockup occurs? but probably fine for a
    > new connection...
    <snip!>

    Thank you for your reply!

    There *is* one bit of information I ommitted, I realize, and that is that
    "lockup" is not the symptom of this problem. That is, the system does not
    hang or crash.

    What *does* happen is that the script gets garbled. It spits out the wrong
    name->id map. It seems to change with each successive hit, too, that is,
    it does not stay garbled in a fixed, offset kind of manner. It is a
    different garble each time you hit it.

    I can't seem to tell if this is random or if it moves successively
    through each id in its list of id's.

    Also, I did not create the script with a continuous database connection in
    mind. The script looks up the mappings in the database *once*, creates an
    associative array based on this lookup, and uses that hash as its lookup
    table -- all in memory (presumably). (I always try to limit the number of
    times I actually need to access the database for *any* script or program I
    write, toot toot*) Thus there is little or no chance of
    db connection loss being the problem.

    thanks
    later...

      (* toot too == sound of me tooting my own horn)

    -- 
        Jeffrey D. Silverman | jeffrey AT jhu DOT edu
    Johns Hopkins University | Baltimore, MD
                     Website | http://www.wse.jhu.edu/newtnotes/
    

  • Next message: scriptOmatic: "Re: named.hosts nameserver listing format"

    Relevant Pages