Rocket U2 | UniVerse & UniData

 View Only
  • 1.  Intermittent UniVerse Write Failures

    PARTNER
    Posted 01-29-2024 12:39

    We are seeing UniVerse (v11.3.1) write failures (on Windows 2019 64-bit server) when we repeatedly update a record. Here's the code we use to create this scenario:

    OPEN '', 'CF' TO FILE.CF ELSE STOP

    ID = 'TEST'

    FOR I = 1 TO 1000

    READ REC FROM FILE.CF, ID ELSE REC = ''

    REC<-1> = I:' Iteration' 

    WRITE REC ON FILE.CF, ID

    NEXT I

    END

    The write failures will occur at random passes through the for/next loop.

    This particular file is type 19, but we also see failures on hashed files as well.

    Is there a UniVerse or Windows tunable setting that would help us out? Any other thoughts?



    ------------------------------
    Gil Steidle
    DEV
    DDI System Inc
    brick NJ US
    ------------------------------


  • 2.  RE: Intermittent UniVerse Write Failures

    ROCKETEER
    Posted 01-30-2024 06:34

    What is the error message received? Is it the generic "WRITE failure" message or does it include any additional detail?

    If you add a NAP statement into the loop does the problem still happen? Would determine if a timing/concurrency related behavior.



    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------



  • 3.  RE: Intermittent UniVerse Write Failures

    PARTNER
    Posted 01-30-2024 07:32

    Have you tried adding an ON ERROR clause with a STATUS()?



    ------------------------------
    Tyrel Marak
    Technical Support Manager
    Aptron Corporation
    Florham Park NJ US
    ------------------------------



  • 4.  RE: Intermittent UniVerse Write Failures

    PARTNER
    Posted 01-30-2024 16:46

    Try locking the record before writing it.



    ------------------------------
    Andrew Warhurst
    Senior Manager, Architecture
    Ultradata Australia Pty Ltd
    Malvern East VIC AU
    ------------------------------



  • 5.  RE: Intermittent UniVerse Write Failures

    Posted 01-31-2024 09:07

    What happens if you wrap the Write in a loop with an On Error and Nap, will it eventually write that entry?

    i.e. something like

    Done = @False

    Loop

        Write REC On FILE.CF, ID  On Error

             Done = @False

             Nap 100

         End Then

              Done = @True

        End

    Until Done Do

    Repeat

    Generally, what you describe is the sort of behaviour if something external to UniVerse is accessing the file periodically - such as an AntiVirus routine that is scanning the file when it is written and preventing UniVerse from updating it whilst it is holding it. I think you said before that you are on Windows, so maybe trace using the SysInternals Process Monitor to watch what is going on.



    ------------------------------
    Brian Leach
    Director
    Brian Leach Consulting
    Chipping Norton GB
    ------------------------------



  • 6.  RE: Intermittent UniVerse Write Failures

    Posted 24 days ago

    Brian,

    I concur regarding an AV scan as the most likely candidate. noting that if you are synchrionising with a backup or mirror (e.g. cloud backup) then youc an hot the same issue. 

    Regards

    JJ



    ------------------------------
    John Jenkins
    Thame, Oxfordshire
    ------------------------------



  • 7.  RE: Intermittent UniVerse Write Failures

    PARTNER
    Posted 24 days ago
    We have placed a delay in the On Error clause. This seems to have overcome
    the program stopping with a fatal error. Thanks for everyone's ideas,
    appreciate them.