Re: Trouble with script execution

Brad Van Sickle <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Yep you need to restart to see your changes.

Believe it or not, that's one of the *nice* things about mod_perl. 
Instead of compiling the code during each execution  as PERL does when 
executed as a purely interpreted language , mod_perl causes each Apache 
child process to compile the code during it's first request/execution 
and then caches that compiled version of that code.  You will need to 
restart the web server to clear that cache and force your changes to 
take effect.

This is probably why you're getting inconsistent results after code 
changes, your seeing some requests that are handled by "new" child 
processes that are compiling the latest version of your code and some 
requests that are being handled by "old" child processes which are still 
serving previous versions that they've complied and cached.

It may seem inconvenient for you, but this type of caching is a 
*necessity* when running PERL on any sort of "real" website that gets an 
appreciable amount of traffic for performance reasons.

There are methods you can employ that tell Apache to automatically 
reload when it sees code change, pretty easy to find if you dig around 
the Internet.    Although I wouldn't use this in a production system.



On 5/18/2014 8:04 PM, Worik Stanton wrote:
> On 19/05/14 11:34, John Dunlap wrote:
>> No, you have to restart the server for code changes to be noticed.
> Does that mean I have to restart my server for every change to a script?
>
> Worik
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.