Map file change under load - possible corruption

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 8
Joined: 11 Nov 2016, 20:29

Map file change under load - possible corruption

11 Nov 2016, 20:37

We are using ISAPI 3.1.0.82 and following rule with sitemapper.txt file. This file is dynamically updated by software. We had an issue, when lookup in a sitemapper.txt file has stopped finding records right after file was updated. On next update of sitemapper.txt (without IIS restart) lookup returned to normal.
Is there a known issue, race condition, which can explain this behavior?

Will upgrade to latest version will help?


RewriteMap sitemap txt:sitemapper.txt [NC]
RewriteCond %{HTTP:Host} ^([^.]+)\.outsite\.com$
RewriteRule ^/([^/]+)/(.*)$ /$1/${sitemap:%1|notfound}/$2 [QSA]

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Map file change under load - possible corruption

13 Nov 2016, 13:06

Hello.

Watching for changes in map files was never supposed to be a future, sorry. If you need to reload file in real time you may simply write an .htaccess file that contains RewriteMap directive every time you change map file automatically. It is possible to write .htaccess file without changing anything in it and it will still trigger reload.

User avatar
Posts: 8
Joined: 11 Nov 2016, 20:29

Re: Map file change under load - possible corruption

14 Nov 2016, 00:45

This is important information, thanks for update. So file is not watched and change is not supposed to be picked up.
Is this file cached in memory or read from disk on every request? Is it possible that file change under the load has caused corruption or failed lookups?

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 7 guests