[EMAIL PROTECTED] rewritelock

2006-05-01 Thread Adam Hewitt








Hi Guys,

 

I have written a rewritemap program and I am experiencing
the sync issues that I have seen all over Google. I discovered the rewritelock
option is used to prevent this from occurring, however I can’t seem to get
apache to use one. I am using Apache 2.0.54-4 under Debian and it doesn’t
matter where I specify the lock file to be it is never created (which I
understand that it should be) and even if I manually create the lock file it
doesn’t appear to be used at all. Is there any kind of trick involved that I am
missing, or is this a bug in this version of Apache? I have seen bugs related
to this in previous versions, but they said that they were resolved.

 

Kind regards,

 

Adam.








[EMAIL PROTECTED] RewriteLock never created 2.0.54-4

2005-08-16 Thread Tim Sturtewagen
   *1. /[EMAIL PROTECTED]/*  	  Aug 16, 12:48 pm show 
options 
 



Newsgroups: *alt.apache.configuration*
From: *tim.sturtewa... 
@gmail.com* 
- Find messages by this author 
 


Date: *16 Aug 2005 03:48:34 -0700*
Local: *Tues, Aug 16 2005 12:48 pm *
Subject: *RewriteLock never created*
Reply 
 
| Reply to Author 
 
| Forward 
 
| Print 
 
| Individual Message 
 
| Show original 
 
| Remove 
 
| Report Abuse 
 



Hi,

I am having a hard time here configuring apache2 with mode_rewrite.
The setup is as this: I use mod_rewrite which is working fine.
I use an external perl RewriteMap program:

#!/usr/bin/perl

#   disable buffered I/O which would lead
#   to deadloops for the Apache server
$| = 1;

#   read cookie values one per line from stdin and
#   generate substitution URL on stdout
while () {
   my $tofind = "";
   if (/([^\.]+).*/) {
   $tofind = $1;
   }
   if (!$tofind == "") {
   if (/[^\.]+(.*)\.$tofind-([^\.|\n]+)([^\n]*)/) {
   print "$2$3$1\n";
   } elsif (/[^\.]+\.$tofind-([^\.|\n]+)([^\n]*)/) {
   print "$1$2\n";
   } elsif (/[^\.]+([^\n]*)/) {
   print "1$1\n";
   }
   } else {
   print "1\n";
   }

}

It simply reads a key and with a regex changes some values in it.
The program works fine, when tested command line.
I also use a RewriteLock like this:
RewriteLock /var/lock/apache2/map.cookie.l
ock

When I freshly reload the server and get a lot of hits, all works fine.

But after a while,
the RewriteMap starts returning unsynchronized values. So I get
rewritten values for keys of other requests.
The error that i see when reload apache once the errors stat ocurring
is:
[Sun Aug 14 17:19:20 2005] [error] [client 213.3.49.145] (43)Identifier

removed: apr_global_mutex_lock(rewrite_mapr_lock_acquire) failed

I have tried changing the |AcceptMutex directive, which in Debian is
default sysvsem, to fcntl or flock, but without any success. No lock
files, and out-of-sync after a while.

I was wondering if anyone has any experience with this?

For reference: the apache version is 2.0.54-4 on debian unstable

Kind regards,

Tim Sturtewagen


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]