Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Server lock? where in Server.pm is subroutine new_session



******    message to minivend-users from Chris Daniel <krskrem@speedfactory.net>     ******

I have looked for anything resembling this in Server.pm, see below, I
can not find anything close.

It may help, cause I did the other change in Session.pm, but MV died
again.



Brian wrote :
Date: Sat, 05 Feb 2000 13:53:45 +0000
From: Brian Bullen <brian@bullen.uk.com>
Subject: [mv] deadlock with retired sessions - minivend 3.14.X

******    message to minivend-users from Brian Bullen
<brian@bullen.uk.com>     ******

Problem with minivend 3-14.5 (also preceding releases, 3-14.3 and
3-14.4)

A browser  reloads a page with a URL containing a session id that has
expired.
e.g.
    http://myserver.com/cgi-bin/vlink/product.code?SESSIONID;;

The child process for that connection goes into a loop, and is killed by

the server lock check with text of error in server error.log:

"hammered PID 12345 running 300 seconds"

This is a severe problem - most minivend activity hangs as the session
database is locked,
and the cpu is very busy.

I have a workaround that works for my system.
In Server.pm, subroutine new_session,
change:

for (;;) {
    $Vend::SessionID = random_string() unless defined $seed;
    next if $Vend::RetireDBM($Vend::SessionID);
    undef $seed;

by undefining $seed before jumping back to start of loop, i.e.
for (;;) {
    $Vend::SessionID = random_string() unless defined $seed;
    undef $seed;
    next if $Vend::RetireDBM($Vend::SessionID);

Best Wishes
Brian Bullen





-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: