This is a discussion on RewriteLock never created within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, I am having a hard time here configuring apache2 with mode_rewrite. The setup is as this: I use mod_rewrite ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 (<STDIN>) { 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.lock 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 |