Apache fails to start when more than 3 mod_rewrite rules are used

Running Apache 2.2.9 on Windows Server 2003 Web Edition with mod_perl.

I have the below rewrite rules in a virtual host configuration - used for token management for browser cache control.  The behavior is the same whether RewriteOptions inherit is on or off.

We just upgraded a server from 2.2.2 to 2.2.9 (and re-installed mod_perl as well).  The exact same rewrite rules worked fine on 2.2.2.

When three of the four rewrite rules (in any order) are used, Apache starts and works fine.  When the fourth one is added (it can be any one), Apache fails to start either as a service or from the command line - and it does not log an error...

In the Windows Event Log, however, there is the following error:

Faulting application httpd.exe, version 2.2.9.0, faulting module msvcrt.dll, version 7.0.3790.3959, fault address 0x00037e23.

Any ideas?
RewriteRule ^(.+\.js).*$ $1 [T=application/javascript] 
RewriteRule ^(.+\.xml).*$ $1 [T=text/xml] 
RewriteRule ^(.+\.xsl).*$ $1 [T=text/xml] 
RewriteRule ^(.+\.css).*$ $1 [T=text/css]

Open in new window

LVL 2
ServiceLogixAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

caterham_wwwCommented:
Interesting. The version 2.2.10 has beed released recently. May be that fixes that error? Did you install the binary version provided by httpd.apache.org? You may also try a binary compiled with Visual C++ 2008: http://apachelounge.dj02.net/?page=22
0
ServiceLogixAuthor Commented:
Yes, did the Apache-provided MSI with OpenSSL.

Also already installed 2.2.10 - same behavior.

It may be a perl build incompatibility with mod_perl.  Installed 5.8.8 build 824 on the server... a similarly configured server is working on the same codebase, but with build 820.
0
ServiceLogixAuthor Commented:
Well, I uninstalled perl build 824, installed 820, reinstalled mod_perl (which fails under 820), then installed 824 on top of 820.

Now I can have 4 rewrite rules instead of 3.

Add a 5th, same behavior.

This is stupid.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

caterham_wwwCommented:
And if you remove mod_perl from the configuration (just for testing)?
0
ServiceLogixAuthor Commented:
Weirdest thing...

Tried some stuff out today.

Here are the exact steps:

1) I uncommented 5th Rewrite rule (for xls files).
2) Confirmed Apache fails to start.
3) Comment out 5th Rewrite rule.
4) Confirmed Apache starts ok.
5) Uncomment 5th Rewrite rule
6) Removed +Parent from PerlOptions.
7) Apache fails to start
8) Switched positions of PerlOptions and PerlSwitches
9) Apache starts ok
10) Added +Parent back to PerlOptions.
11) Apache starts ok
12) Moved Perl directives above Rewrite directives
13) Apache fails to start.
14) Undid that - Apache starts ok
15) Undid all changes (file back to original state) and uncommented 5th rewrite rule
16) Apache starts ok.

So, basically, the .conf file was in the state it was in originally where it failed, and now it starts fine.  

Then I commented out the 5th Rewrite rule and restarted fine.

I logged out of the terminal session, came back in, uncommented line.  Apache fails to start.  

Just on a lark, I started again.  Starts fine.

I am not sure what this is - but it's pretty freaky behavior.

I have read that mod_perl was built against a newer version of VC++ using a newer version of msvcrt.dll - and that there are problems with the Apache Monitor failing on older versions.  However, I have the appropriate version of that DLL.

It scares me that Apache/mod_perl is inconsistently unstable like this.
0
ServiceLogixAuthor Commented:
Finally, found a configuration that works... after 4 separate Apache installs.

Apache 2.2.11 with SSL... ActiveState Perl 5.10 and Mod_perl 2 (built for 5.10).

We had to upgrade our production server, and I was not looking forward to encountering the same problems.  Other than some modules which were binary incompatible with 5.10, everything appears to be reasonable.

Though I got a few msvcrt.dll errors when initially started, it's been stable for two days without further errors.

Removing mod_perl was not an option since everything's already coded for it.

From what I've read, apparently, the Apache folks, ActiveState folks and mod_perl folks were compiling against different versions of msvcrt.dll...

You'd think that more people would have encoutered this problem.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.