That looks very much like your server is running mod_perl or something with similar characteristics.

For comparison, here are some logs from a couple of CGI scripts running on my system: one under mod_perl and the other not. Note that with mod_perl the same process id appears over and over while without mod_perl each request causes a new process to be started.

cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3632 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3660 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 cgi under mod_perl process id 3632 standard cgi process id: 3926 standard cgi process id: 3928 standard cgi process id: 3929 standard cgi process id: 3930 standard cgi process id: 3931 standard cgi process id: 3933 standard cgi process id: 3934 standard cgi process id: 3935 standard cgi process id: 3936 standard cgi process id: 3938 standard cgi process id: 3939 standard cgi process id: 3940 standard cgi process id: 3941 standard cgi process id: 3942 standard cgi process id: 3944 standard cgi process id: 3945 standard cgi process id: 3984 standard cgi process id: 3986 standard cgi process id: 3987

As all your requests are making it to the server and you can see the server running a mixture of versions of your script, you can forget about proxy servers.

Previously you said that you sometimes saw responses from old versions of your script even after you restarted the server. I expect you will find you were mistaken (no offense intended) and that after you restart the server you no longer receive responses from versions from before the restart.

When you restart your apache server, you should see entires similar to the following in your web server error log:

[Wed May 05 19:29:50 2010] [notice] caught SIGTERM, shutting down [Wed May 05 19:30:19 2010] [notice] Apache/2.2.12 (Ubuntu) mod_perl/2. +0.4 Perl/v5.10.0 configured -- resuming normal operations

As for the ps output, the PID column shows the process ID, the STIME column shows when the process was started. In the sample you posted, all the processes are apache2 server processes. This confirms that it is apache2 that is running your CGI script and that it is doing so within the server process, as mod_perl does.

Assuming you are running mod_perl (fairly certain at this point) then after each restart you should only see the latest version in the logs (and responses) and any new versions introduced since restarting the server.

You can confirm your server is running mod_perl by checking the configuration for your website. You might find the mod_perl configuration manual helpful for understanding what to look for in your apache configuration file.


In reply to Re^11: apache/perl caching problem by ig
in thread apache/perl caching problem by ksublondie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.