|Strange delay when using mod_rewrite|
works on web server, not on home machine
I'm using mod_rewrite to make dynamic url's "look nicer" on several sites. It works fine.
But now on my home machine, every site where I've installed an htaccess file now has random delays. I try to look at the site, and the page takes a long time to come up. When it does, I click through a few pages easily, and then, for no apparent reason, another long delay. The mod_rewrite rule is working, because I do eventually get to the page.
Anyone have an idea?
I have mod_rewrite doing a few things on more than half of my sites, and I have yet to experience a delay in fetching the pages.
Could it be your ISP causing the delay? Have you tried connecting to the server from various proxies? Was there a delay, or was the response time equivelent?
Is your server under a really heavy load? What does top say when you type it in?
There are lots of things that, together, cause server load & delays in fetching pages.
What about a traceroute between you & the target server? Any routing issues?
Thanks for the response, Jeremy!
Obviously my initial message was really not very clear, sorry about that.
These sites are working *perfectly* on their web server.
It's on my machine, where I look at them internally, that I'm having this problem! I have installed apache, mysql and php using EasyPHP if that makes any difference.
|It's on my machine, where I look at them internally, that I'm having this problem! I have installed apache, mysql and php using EasyPHP if that makes any difference. |
What sort of machine do you have? Windows? Linux? How much RAM? Is the home machine exclusively doing webserving, or do you do other stuff on it? Does the hard disk churn during the delay? It could be due to memory management problems or insufficient RAM, rather than with mod_rewrite itself.
win2k, p4 1.7, 256K of ram
|What sort of machine do you have? Windows? Linux? How much RAM? |
Lots of other stuff
|Is the home machine exclusively doing webserving, or do you do other stuff on it? |
|Does the hard disk churn during the delay? |
Well, the weird thing is that I don't have this problem at all with other dynamic sites on my machine, *only* with sites that rewrite url's using mod_rewrite! The page begins to load and then it "stalls" - the images don't load, and the browser locks for maybe 10-15 seconds. Then all works again.
|It could be due to memory management problems or insufficient RAM, rather than with mod_rewrite itself. |
If finally occured to me to chech the apache error log. I'm getting the following line :
[Mon May 26 23:13:47 2003] [error] [client 127.0.0.1] (36)Resource deadlock avoided: mod_rewrite: failed to lock file descriptor
Anyone have an idea what this means?
If you are using a RewriteMap program, check your RewriteLock [httpd.apache.org] directive to be sure that the lock file is properly defined. The RewriteLock file must not be defined as an NFS-mounted-device file, but should be local.
Thanks for the very quick response! But I'm afraid it's a bit over my head.
> If you are using a RewriteMap program, check...
huh? I don't even know what a RewriteMap program is! I've installed apache/php/mysql using EasyPHP, and mod_rewrite works, only then at seemingly random intervals I get this "stall" with then, the error in the apache error log.