W2K3 Server Standard SP2 ISAPI Failure

Topics: Developer Forum, Project Management Forum
Jun 13, 2007 at 8:39 PM
Hi,

I'm using Isapi Rewrite Filter at my www.direito2.com.br web site and I do not know what is going on... my system works fine, but suntently it stops.

I have a Windows 2003 Server Standard at a dual XEON 2.8 GHz with 1GB RAM. I'm trying to use with both versions, the v1.2.11b and v1.2.11c, but both have the same behevior. I tried to get information from Windows Log and other, but still no clue.

I've installed the ISAPI DLL at direito2.com.br virtual domain and all web site have it's own App Pool.

I did not see any strange thing, such memory leaks or high CPU use... As I can see, the ISAPI is stopping for a while...

I got some erros as follow:
Application pool 'Zevallos Direito2' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

And before, I got some of these:
A process serving application pool 'Zevallos Direito2' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '8136'. The data field contains the error number.

As can see, today the system works fine for 7 hours and to restablish, I have to do a IIS Restart...

I want the user to see the following addresses, but my system also generates all HTML pages for me, but, as this system have more than 70 thousand pages, I have to check if really exist the HTML page before. Also I have some issues from my other way, that I used /2007/6/1/Pagina132.htm, as this page and all, I have to send to the OMRedirect.asp that try to find the right page for the new way or send to a 404 erro page.

I did lot's of tests in local system, and it works fine... fast that the user do not know if is working or not.

Here the following possible directories.

/noticias/2000/
/noticias/2000/jun
/noticias/2000/jun/1

/stj/2000/dez/10/
/stj/2000/dez/10/stjrecebeparecerdompnohabeascorpusdenicolaudos_santos

I've tested all RegEx, and all is doing fine... both tests, that check if exists and those do not and redirect to OMRedirect.asp

  1. IsapiRewrite4.ini
#

RewriteLog C:\zevallos\web\direito2.com.br\IsapiRewrite\Direito2combr
RewriteLogLevel 3

RewriteFilterPriority HIGH

  1. Redireciona as páginas erradas geradas pelo OM
  2. RewriteCond %{SERVER_NAME} (?i)^www\d\.direito2\.com\.br.$

  1. http://www.direito2.com.br/1999/4/6/Pagina1657.htm
  2. /2007/6/11/Pagina1.htm
RewriteCond %{HTTP_URL} (?i)^/(\d)/(\d)/(\d)/Pagina(\d)\.+(htm|html)$
RewriteCond %{PATH_TRANSLATED}\%1\%2\%3\Pagina%4.htm !-f
RewriteRule (?i)^/\d/\d/\d/Pagina(\d)\.(htm|html)$ /OMRedirect.asp?t=$1&WebPublisher=1 L

  1. /agu/2007/jun/11/pgudivulgaresultadodaconsultageralpara
RewriteCond %{HTTP_URL} ^/(\w)/(\d)/(\w)/(\d)/(^.+)$
RewriteCond %{PATH_TRANSLATED}\%1\%2\%3\%4\%5.htm !-f
RewriteRule (?i)^(/\w/\d/\w/\d)(/^.+)$ /OMRedirect.asp?p=10&d=$1&f=$2&WebPublisher=1 U

  1. /agu/2007/jun/11/pgudivulgaresultadodaconsultageralpara
RewriteCond %{HTTP_URL} ^/(\w)/(\d)/(\w)/(\d)/(^.+)$
RewriteCond %{PATH_TRANSLATED}\%1\%2\%3\%4\%5.htm -f
RewriteRule (?i)^(/\w/\d/\w/\d)(/^.+)$ $1$2.htm U,L

  1. /agu/2007/jun/11/pgudivulgaresultadodaconsultageralpara.htm
RewriteCond %{HTTP_URL} (?i)^(\w)/(\d)/(\w)/(\d)/(.*?)\.(htm|html)$
RewriteCond %{PATH_TRANSLATED}\%1\%2\%3\%4\%5.htm !-f
RewriteRule (?i)^(/\w/\d/\w/\d/.*?)\.(htm|html)$ $1 R,L

  1. /2007/6/11/diretodoplenariosuspensoojulgamentosobre
  2. RewriteRule (?i)^/(\d/\d/\d)/(^/.)((/default)?\.(htm|html))?$ /OMRedirect.asp?p=10&Da=$1&f=$2&WebPublisher=1 L,U


  1. /noticias/2007/
RewriteCond %{HTTP_URL} (?i)^/noticias/(\d+)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\noticias\%1\default.htm !-f
RewriteRule (?i)^(/noticias/\d+)/?(default\.(htm|html))?$ /OMRedirect.asp?p=10&d=$1&WebPublisher=1 L,U

RewriteCond %{HTTP_URL} (?i)^/noticias/(\d+)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\noticias\%1\default.htm -f
RewriteRule (?i)^(/noticias/\d+)/?(default\.(htm|html))?$ $1/default.htm L,U

  1. /noticias/2007/jun/
RewriteCond %{HTTP_URL} (?i)^/noticias/(\d)/(\w)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\noticias\%1\%2\default.htm !-f
RewriteRule (?i)^(/noticias/\d/\w)/?(default\.(htm|html))?$ /OMRedirect.asp?p=10&d=$1&WebPublisher=1 L,U

RewriteCond %{HTTP_URL} (?i)^/noticias/(\d)/(\w)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\noticias\%1\%2\default.htm -f
RewriteRule (?i)^(/noticias/\d/\w)/?(default\.(htm|html))?$ $1/default.htm L,U

  1. /noticias/2007/jun/6/
RewriteCond %{HTTP_URL} (?i)^/noticias/(\d)/(\w)/(\d+)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\noticias\%1\%2\%3\default.htm !-f
RewriteRule (?i)^(/noticias/\d/\w/\d+)/?(default\.(htm|html))?$ /OMRedirect.asp?p=10&d=$1&WebPublisher=1 L,U

RewriteCond %{HTTP_URL} (?i)^/noticias/(\d)/(\w)/(\d+)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\noticias\%1\%2\%3\default.htm -f
RewriteRule (?i)^(/noticias/\d/\w/\d+)/?(default\.(htm|html))?$ $1/default.htm L,U


  1. /stf/2007/jun/12/
RewriteCond %{HTTP_URL} (?i)^/(\w)/(\d)/(\w)/(\d)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\%1\%2\%3\%4\default.htm !-f
RewriteRule (?i)^(/\w/\d/\w/\d)/?(default\.(htm|html))?$ /OMRedirect.asp?p=10&d=$1&WebPublisher=1 L,U

RewriteCond %{HTTP_URL} (?i)^/(\w)/(\d)/(\w)/(\d)/?(default\.(htm|html))?$
RewriteCond %{PATH_TRANSLATED}\%1\%2\%3\%4\default.htm -f
RewriteRule (?i)^(/\w/\d/\w/\d)/?(default\.(htm|html))?$ $1/default.htm L,U

  1. Faz o teste e ajusta as notícias do Calendário
  2. http://www.direito2.com.br/2007/6/12/PaginaNoticiaSTFNoticias.htm
  3. http://www.direito2.com.br/ApresentaSite.asp?o=140&t=2007/06/08&Temp=STFNoticias
RewriteCond %{HTTP_URL} (?i)^/(\d/\d/\d+)/PaginaNoticia(^.*)\.(htm|html)$
RewriteCond %{PATH_TRANSLATED}\%1\PaginaNoticia%2.htm !-f
RewriteRule (?i)^/(\d/\d/\d+)/PaginaNoticia(^.*)\.(htm|html)$ /ApresentaSite.asp?o=140&t=$1&Temp=$2&WebPublisher=1 L,U

  1. Faz o teste e ajusta as notícias agrupadas
  2. http://www.direito2.com.br/PaginaSTFNoticias.htm
  3. http://www.direito2.com.br/ApresentaSite.asp?O=130&t=STF&a=11&Temp=STFNoticias
  4. RewriteCond %{HTTP_URL} (?i)^/(PaginaNoticia(^.*)\.(htm|html)$
  5. RewriteCond %{PATH_TRANSLATED}\Pagina%2.htm !-f
  6. RewriteRule (?i)^/(\d/\d/\d+)/Pagina(^.*)\.(htm|html)$ /OMRedirect.asp?p=20o=130&t=$1&Temp=$2&WebPublisher=1 L,U

  1. Não deixa clientes usarem imagens que não sejam do browser aberto
RewriteCond %{HTTPREFERER} ^(?!HTTPREFERER)
RewriteCond %{HTTP_REFERER} (?i)^(?!http?://(?:(www|pub|proc)(\d+)?\.)direito2\.com\.br/)
RewriteCond %{HTTP_REFERER} ^(?!http?://66\.226\.73\.254/)
RewriteRule (?i)\.(?:gif|jpg|jpeg|png)$ /blocked.png L

RewriteRule ^blocked\.png$/ blocked.png I,L
Jun 14, 2007 at 8:20 PM
Hi... the problem happend again, with the version 1.2.12b.

Here all Application Log messages, as I can see, the problem is when it's have to execute the last rule... the images to not be loaded... I took it off and I hope it stops.

Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1011
Date: 6/14/2007
Time: 12:41:54 PM
User: N/A
Computer: 66-226-73-76
Description:
A process serving application pool 'Zevallos Direito2' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '4192'. The data field contains the error number.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 6d 00 07 80 m..?

  1. Direito2combr.4192.log <-- Last lines of a running site for more than 6 hours
============================
Thu Jun 14 12:38:55 2007 - New Url: '/sitemap200103.xml'
Thu Jun 14 12:38:55 2007 - No Rewrite
Thu Jun 14 12:39:35 2007 - DllMain THREAD_DETACH, threadId= 2656
Thu Jun 14 12:39:35 2007 - DllMain THREAD_DETACH, threadId= 1756
Thu Jun 14 12:39:37 2007 - DllMain THREAD_DETACH, threadId= 3680
Thu Jun 14 12:39:37 2007 - DllMain THREAD_DETACH, threadId= 1556
Thu Jun 14 12:40:37 2007 - DllMain THREAD_DETACH, threadId= 1700
Thu Jun 14 12:41:37 2007 - DllMain THREAD_DETACH, threadId= 6660
Thu Jun 14 12:41:37 2007 - DllMain THREAD_DETACH, threadId= 6308
Thu Jun 14 12:41:50 2007 - New Url: '/GoogleSiteSearch.htm?q=controledeconstitucionalidade&client=pub-3230208523731980&forid=1&channel=9895025956&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A11&hl=pt'
Thu Jun 14 12:41:50 2007 - No Rewrite
Thu Jun 14 12:41:50 2007 - New Url: '/geral.css'
Thu Jun 14 12:41:50 2007 - No Rewrite
Thu Jun 14 12:41:52 2007 - New Url: '/funcoes.js'
Thu Jun 14 12:41:52 2007 - No Rewrite
Thu Jun 14 12:41:53 2007 - New Url: '/imagens/logo.gif'
Thu Jun 14 12:41:53 2007 - New Url: '/imagens/logobeta.gif'

--------------
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1011
Date: 6/14/2007
Time: 12:41:55 PM
User: N/A
Computer: 66-226-73-76
Description:
A process serving application pool 'Zevallos Direito2' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '3524'. The data field contains the error number.

Data:
0000: 6d 00 07 80 m..?


  1. Direito2combr.3524.log
============================
Thu Jun 14 12:41:55 2007 - Read .ini file: setting LogLevel to 1
Thu Jun 14 12:41:55 2007 - Read .ini file: Filter Priority is now: HIGH (0x80000)
... read all rules without error...
Thu Jun 14 12:41:55 2007 - Done reading .ini file: Found 15 rules (0 failed) on 95 lines
Thu Jun 14 12:41:55 2007 - Ionic URL Rewriting ISAPI Filter v1.2.12b
Thu Jun 14 12:41:55 2007 - Initialize, main threadId= 1536
Thu Jun 14 12:41:55 2007 - File watcher thread created.
Thu Jun 14 12:41:55 2007 - GetFilterVersion
Thu Jun 14 12:41:55 2007 - New Url: '/imagens/logo.gif'

--------------
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1011
Date: 6/14/2007
Time: 12:41:56 PM
User: N/A
Computer: 66-226-73-76
Description:
A process serving application pool 'Zevallos Direito2' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '5680'. The data field contains the error number.

Data:
0000: 6d 00 07 80 m..?


  1. Direito2combr.5680.log
============================
Thu Jun 14 12:41:56 2007 - Read .ini file: setting LogLevel to 1
Thu Jun 14 12:41:56 2007 - Read .ini file: Filter Priority is now: HIGH (0x80000)
... read all rules without error...
Thu Jun 14 12:41:56 2007 - Done reading .ini file: Found 15 rules (0 failed) on 95 lines
Thu Jun 14 12:41:56 2007 - Ionic URL Rewriting ISAPI Filter v1.2.12b
Thu Jun 14 12:41:56 2007 - Initialize, main threadId= 2440
Thu Jun 14 12:41:56 2007 - File watcher thread created.
Thu Jun 14 12:41:56 2007 - GetFilterVersion
Thu Jun 14 12:41:56 2007 - New Url: '/OMPageCounter.js'
Thu Jun 14 12:41:56 2007 - No Rewrite
Thu Jun 14 12:41:56 2007 - New Url: '/imagens/rssnovo2.gif'


--------------
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1011
Date: 6/14/2007
Time: 12:41:57 PM
User: N/A
Computer: 66-226-73-76
Description:
A process serving application pool 'Zevallos Direito2' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '1744'. The data field contains the error number.

Data:
0000: 6d 00 07 80 m..?

  1. Direito2combr.1744.log
============================
Thu Jun 14 12:41:57 2007 - Read .ini file: setting LogLevel to 1
Thu Jun 14 12:41:57 2007 - Read .ini file: Filter Priority is now: HIGH (0x80000)
... read all rules without error...
Thu Jun 14 12:41:57 2007 - Done reading .ini file: Found 15 rules (0 failed) on 95 lines
Thu Jun 14 12:41:57 2007 - Ionic URL Rewriting ISAPI Filter v1.2.12b
Thu Jun 14 12:41:57 2007 - Initialize, main threadId= 776
Thu Jun 14 12:41:57 2007 - File watcher thread created.
Thu Jun 14 12:41:57 2007 - GetFilterVersion
Thu Jun 14 12:41:57 2007 - New Url: '/Library/bbrasil.gif'


--------------
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1011
Date: 6/14/2007
Time: 12:41:57 PM
User: N/A
Computer: 66-226-73-76
Description:
A process serving application pool 'Zevallos Direito2' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '4748'. The data field contains the error number.

Data:
0000: 6d 00 07 80 m..?


  1. Direito2combr.4748.log
============================
Thu Jun 14 12:41:57 2007 - Read .ini file: setting LogLevel to 1
Thu Jun 14 12:41:57 2007 - Read .ini file: Filter Priority is now: HIGH (0x80000)
... read all rules without error...
Thu Jun 14 12:41:57 2007 - Done reading .ini file: Found 15 rules (0 failed) on 95 lines
Thu Jun 14 12:41:57 2007 - Ionic URL Rewriting ISAPI Filter v1.2.12b
Thu Jun 14 12:41:57 2007 - Initialize, main threadId= 2024
Thu Jun 14 12:41:57 2007 - File watcher thread created.
Thu Jun 14 12:41:57 2007 - GetFilterVersion
Thu Jun 14 12:41:57 2007 - New Url: '/imagens/rssnovo2.gif'

--------------
Event Type: Error
Event Source: W3SVC
Event Category: None
Event ID: 1002
Date: 6/14/2007
Time: 12:41:57 PM
User: N/A
Computer: 66-226-73-76
Description:
Application pool 'Zevallos Direito2' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Coordinator
Jun 14, 2007 at 11:19 PM
Hi!
Can you enclose your .ini file in a blockquote - the forum engine is interpeting the ini file as markup, and I cannot understand it. If you enclose the ini text in double curly-braces, I'll be able to read it.

-Cheeso
Jun 17, 2007 at 10:08 PM
Hi Cheeso,

I did a preview, but did not work... so... you can get it at
www.direito2.com.br/files/IsapiRewrite.zip

http://www.direito2.com.br/files/IsapiRewrite.zip

I zipped all logs and .ini that I'm using... of course, I deleted the image part and I still do not have any problem for 2 days...
Coordinator
Jun 19, 2007 at 9:45 PM
Zevallos
can you clarify please?

Are you saying that IIRF has a problem only in the case that ...
you include rules that rewrite the URLs for images?

-Cheeso
Jun 19, 2007 at 10:35 PM
Yes... I have those errors only with image rules...
Coordinator
Jun 19, 2007 at 10:44 PM
Also, Zevallos,

what do you intend by using these RewriteConds?
RewriteCond %{HTTP_REFERER} (?i)^(?!http?://(?:(www|pub|proc)(\d+)?\.)direito2\.com\.br/)
RewriteCond %{HTTP_REFERER} ^(?!http?://66\.226\.73\.254/)

In particular, I am interested in your use of the (?!http?: ... sequence. what do you intend by this?

I am guessing you want to say, if the HTTP_REFERER is http://xxx.direito2.com.br, then allow image requests to be honored. (NO REWRITE)
also if the HTTP_REFERER is https://xxx.direito2.com.br, then likewise, DO NOT REWRITE.

but the "wildcard" in regular expressions is a dot character (.) . Not a question mark (?). But you don't really want "any char". I think you are probably looking for http or https. So I think you want something closer to: (?!(http|https)://(www|pub|proc\d*)\.direito2\.com\.br/)

Also, the (?:(www...)) segment - why do you use the "don't capture" sequence? (?:) Is it imperative that you use it in this case? Can you test without it?

Finally, why do you use (\d+)? ?? This could be more simply stated without parens and without the + and ?, as \d* . The use of (x+)? constructs can have degenerative behavior at runtime according to the PCRE documentation.

I do not know, but it could be the regular expression is causing a problem here. If you could simplify it, that may avoid your problem.

The original problem you described sounded as if the process "went away" - it was spinning. The PCRE engine can possibly do this, in edge cases, given a particularly complex pattern and a particular test string. In other words, PCRE can spin. This would lead to the problem you reported - that your w3WP.exe lost communication.

So please check your regular expressions, and maybe try to simplify them.

-Cheeso