Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

mod rewrite performance slowdown?

mod rewrite performance slowdown?



2:33 pm on Mar 12, 2003 (gmt 0)

10+ Year Member

I just had our web programmer put up mod rewrite for the apache webserver, and our site was so slow I had to remove the rewrite all together.
We have a dedicated server with RackShack.net - Celeron 1.3 GHZ, 1 GB ram, 60gb hard drive, etc etc
I have heard that rewrite can cause some performance slowdowns, but should it have caused this much?
Sendmail went down every 5 minutes, the pages took upwards of 45 seconds to load, and apache webserver and the server itself needed to be restarted every hour just to keep it from totally crashing.

Is this something that can be remedied with upgrading servers, processors, RAM, etc?

Is it possible our programmer did not do a thorough job?

If anyone knows, please advise, I would still love to put rewrite back up and our company is willing to hire someone to do this, if they can do it right.


Alternative Future

2:45 pm on Mar 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

When I implemented mod_rewrite I had a severe load time performance issue and sometimes it even went into an infinite loop!

Without seeing your mod_rewrite code I can't really comment on what to do or not, but when I used the RewriteCond, which was shown to me on WebMasterWorld, it worked without any problems.

Perhaps ask your developer if he has RewriteCond used in the rewrite_module...




2:48 pm on Mar 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Welcome to WebmasterWorld [webmasterworld.com] Jason.

You might want to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post which contains a lot of useful information.

Such a severe slow down is most likely due to a misconfiguration, some endless loops, having RewriteLog [httpd.apache.org] enabled and RewriteLogLevel [httpd.apache.org] set to a very high value, etc. You should not do any logging on a live server.

Using /rewriterules/ in your httpd.conf file is really fast. If run Apache [httpd.apache.org] 1.3 and you use them in a directory context this will add quite a bit of overhead since mod_rewrite [httpd.apache.org] has to do subrequests to overcome Apache [httpd.apache.org] 1.3s API limitations. But even then you should not experience such a slow down as you describe.

Id suggest you check the configuration and your /rewriterules/ and then give mod_rewrite [httpd.apache.org] another try. You might want to check out An Introduction to Redirecting URLs on an Apache Server [webmasterworld.com] and follow the links to the mod_rewrite [httpd.apache.org] documentation and the URL-Rewriting Guide.

HTH Andreas


2:58 pm on Mar 12, 2003 (gmt 0)

10+ Year Member

Thanks so much for the warm welcome and fast replies.

I have no experience with this, but I will pass it on to our programmer.

I have tried to keep up with what you're saying, but unfortunately I don't know what the programmer has done so far (other than crash the server).

Are any of you interested in perhaps taking this project on for some kind of payment?

Thanks again.


11:39 pm on Mar 14, 2003 (gmt 0)

10+ Year Member

Thank you for the suggestions everyone.
We gave mod_rewrite another try, this time with a different programmer, and it works perfectly.
I appreciate your help, it really came in handy.


11:59 pm on Mar 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

The biggest mistake with mod_rewrite is to have many rules and do not use the "last rule" flag.

Enable debug level logging and do a couple of requests. Then check the logs and see if there is a lot of unnecessary processing going on, that you could limit with [L] flag.


Featured Threads

Hot Threads This Week

Hot Threads This Month