Question

I'm running an apache2 / mod_perl2 combo on our development server.

When I'm developing, my changes are instantly reflected in the webpage I'm working on. I assumed mod_perl was being clever and was reloading files when they were changed.

But now another developer is working on a different part of the system and their changes are not picked up by mod_perl. He has to restart apache before he can see his changes.

Is there a way to disable caching on our development server, or get mod_perl to pick up his changes?

Thanks.

EDIT: I'm editing file directly on the dev server using VI, the other developer has mounted their dev directory via samba, and is editing their files in windows. This seems to be the difference that prevents mod_perl picking up changes.

Was it helpful?

Solution

I just read a nice blog post that sums up all possible ways to achieve this: How not to restart mod_perl servers by Jonathan Swartz

OTHER TIPS

What exactly is the other developer changing?

To reload modules when they have changed you would use Apache2::Reload. (Though see Performance Issues before thinking about using this in production.)

Even without that, mod_perl will reload cgi scripts when they change; I don't know of any way the other developer could have turned that off if you are talking about cgi scripts.

Since it's just for development, how about just killing all of the child processes and letting the parent apache process respawn?

kill -9 $(ps axf | grep httpd | egrep -e ' S ' | cut -b1-5 | paste -s -d ' ')
  • The above command works for me on my box in my environment, your mileage will vary.

It's not an elegant solution by any means, but hey, it's faster than a full apache restart.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top