[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

2328.0. "MAKE_UIC fails if record is locked " by VNABRW::EHRLICH_K (Monarchy: Karl&Chessie HABSBURG) Thu Feb 25 1993 17:50

    Good evening all,
    
    	the CoV is now running ALL-IN-1 V3.0-1 on one of their Clusters.
    
    They have detected a - I think it's not a great - problem with 
    creating a lot of user (MGT MUA CU).
    
    During the first CU-Job MAKE_UIC is called and locks the SYSUAF record.
    The next CU-Job fails because of the error that the SYSUAF record is 
    locked.
    
    The SYS$BATCH Queue has a Joblimit of 5. You know what this means.
    And if the Batchqueue is stopped and there're some CU-Jobs in it,
    all are started at same time. The first wins, the others die.
    
    So is it neccessary that you'll set the Joblimit to 1 if you'Ve to
    create 100s (really!) of users? 
    Is there an other way like changing the MAKE_UIC function to wait
    for a 'timeout' to determine that the lock's gone away ???
    
    Best regards 
    
    Charly_from_the_deepest_snowing_Vienna 
      
    
     
T.RTitleUserPersonal
Name
DateLines
2328.1you've found a good way to test this!IOSG::TYLDESLEYFri Feb 26 1993 09:5541
>>  The SYS$BATCH Queue has a Joblimit of 5 ... if the Batchqueue is
>>  stopped and there're some CU-Jobs in it, all are started at same
>>  time. The first wins, the others die.
-----
Hi Charly,
Thank you for this information. I had problems with competing jobs during
development of this code. In this case it was test jobs set off by a test
suite in very close succession. So, I set a timer in Make_Uic which, if it
can't get the lock on the resource, waits and tries again to get the lock.

This worked fine, I suspect because although in close proximity, they were
not exactly the same time; Make_Uic doesn't take very long to do its
business with the sysuaf, and so mostly the timeout worked. But, what you
seem to have is a large number of jobs re-trying ~at the same time
exactly~. - and they're getting locked out because they retry at the same
time again and can't get the lock.

The logic goes something like this:
	    
    . Set the timer period  (hard-coded to 2 minutes at present)

    . Take out a lock for the function MAKE_UIC;

    . Attempt to get an exclusive lock.

    . First attempt to get an exclusive lock, but don't queue it

    . If can't get the lock, set a timer and wait for 120 seconds:

    . Second attempt to get an exclusive lock;

    . If can't get the lock on second attempt, accept defeat and
      give up..

I guess I'll have to have another look at this ;-)! We do have an
outstanding case against this problem, so there's no need to SPR. It's
not a major problem in routine account creation, but is a problem if you
intend to do multiple creates.

Cheers
DaveT
2328.2Oh, great!VNABRW::EHRLICH_KMonarchy: Karl&Chessie HABSBURGFri Feb 26 1993 11:2912
    Hi Dave,
    
    	it's really a great reply. What should we do, if we're not having
    great customers like the CoV (City of Vienna). They've a good
    environment for testing, which we never could have here in our office.
    
    It's now nice to hear that you'll apply a 'timeout' parameter to the
    MAKE_UIC function in one of the next releases.
    
    Many thanks again
    
    Charly_from_CSC_Vienna
2328.4not doneIOSG::TYLDESLEYThu Jul 14 1994 18:243
    This has not been fixed for V3.1. 
    I have contacted Jean by mail.
    DaveT