Current Data sudden become Not Ready

Forum Home Forums Runtime Bugs Current Data sudden become Not Ready

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #14063
    kcks66
    Participant

    Hi Mikhail,

    I am using v6. As per topic, some of my calculated data sudden became — while Real data and other calculated data all OK.

    https://ibb.co/XCWfBB6

    I click Upload button and the Current Data become Ready back. Those — calculated data also got reading back.

    As you can see one of the — calculated data has no data in the graph below.

    https://ibb.co/N6YmSKY

    Somehow there is data stored in PostgreSQL below.

    https://ibb.co/qpgLT6z

    Need your advice to avoid this incident from happen in the future.
    Thank you.

    #14064
    Mikhail
    Moderator

    Hi,
    Could you provide the screenshot of the archive configuration and archive log file?

    #14065
    kcks66
    Participant

    Hi Mikhail,

    My archive configuration screenshot as below.

    https://ibb.co/s93tZ36

    But I have no idea where to get the archive log file.

    • This reply was modified 2 months ago by kcks66.
    #14071
    Mikhail
    Moderator

    Hi,
    Archive configuration is displayed when you open its properties.
    Log files are located in SCADA\ScadaServer\Log directory. You should enable the detailed log in the archive properties.

    #14079
    kcks66
    Participant

    Hi Mikhail,

    I just enable the Current Data’s detailed log. Rigth now I just wait for next Current Data suddenly become Not Ready again in the future, right?

    #14081
    Mikhail
    Moderator

    OK. Save log files in case of error.

    #14206
    kcks66
    Participant

    Hi Mikhail,

    The same error happened again:

    https://ibb.co/stJ9XrN

    This round I managed to capture the error log:

    2024-03-13 22:27:04 Enqueueing of 1401 data points completed successfully in 0 ms
    2024-03-13 22:27:04 Data queue has become empty
    2024-03-13 22:27:30 Enqueueing of 1401 data points completed successfully in 0 ms
    2024-03-13 22:27:31 Error writing to database:
    Npgsql.PostgresException (0x80004005): 57P03: the database system is shutting down
    at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|223_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
    at Npgsql.Internal.NpgsqlConnector.Authenticate(String username, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
    at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|203_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
    at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
    at Npgsql.ConnectorPool.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
    at Npgsql.ConnectorPool.<Get>g__RentAsync|28_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
    at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|45_0(Boolean async, CancellationToken cancellationToken)
    at Npgsql.NpgsqlConnection.Open()
    at Scada.Server.Modules.ModArcPostgreSql.Logic.PointQueue.ProcessItems()
    Exception data:
    Severity: FATAL
    SqlState: 57P03
    MessageText: the database system is shutting down
    File: postmaster.c
    Line: 2353
    Routine: ProcessStartupPacket
    2024-03-14 08:24:35 Reading of 1401 data points completed successfully in 81 ms
    2024-03-14 08:24:35 Enqueueing of 1401 data points completed successfully in 0 ms
    2024-03-14 08:24:36 Data queue has become empty
    2024-03-14 08:25:00 Enqueueing of 1401 data points completed successfully in 0 ms
    2024-03-14 08:25:00 Data queue has become empty

    I reupload again then the Achieve all became Ready back. Pls advice for what should I do to avoid this from happened again.

    Thank you.

    #14211
    Mikhail
    Moderator

    Hi,
    You can see that the error is

    Npgsql.PostgresException (0x80004005): 57P03: the database system is shutting down
    

    You should check the PostgreSQL database. When it is not available from SCADA, try to connect to it by pgAdmin.

    #14214
    kcks66
    Participant

    Hi Mikhail,

    1) I couldn’t understand why PostgreSQL database suddenly shutting down?
    2) The Rapid SCADA’s Archive became READY back after I clicked the Rapid SCADA upload button. Pls advice the error is came from Rapid SCADA side or PostgreSQL database side?

    By the way, where should I check at PostgreSQL database/pgAdmin to search for error?
    Thank you.

    #14220
    Mikhail
    Moderator

    Hi,

    1) The error is weird. It’s the first time when we faced this type of error.
    What PostreSQL version do you use?

    2) Probably, it just reconnects. The next time, if the error occurs, try stop and start SCADA-Serve without uploading the project.
    Using pgAdmin simply try to connect to the database and open the data tables after the error occurs.

    #14221
    Mikhail
    Moderator

    May be the error occurs after the computer restart? And PostgreSQL has not started yet?

    #14222
    kcks66
    Participant

    Hi Mikhail,

    1) I am using PostgreSQL 16.

    2) Noted. I will stop and start SCADA-Serve without uploading the project, and use pgAdmin to check database if the error occurs again.

    FYI, the computer is left 24/7 without shutting down. I also enable MinCopy by using ModArcBasic just in case happen in the future I can cross check.

    #14225
    kcks66
    Participant

    Hi Mikhail,

    May be the error occurs after the computer restart? And PostgreSQL has not started yet?

    I managed to installed PC On/Off Monitor software into the PC and I found there was a PC shutdown exactly at that time. Kindly see below for the findings:

    https://ibb.co/9NgvPX4

    I think the PC restart is because there is Windows Update activities historical record found on 13/3.

    I believe we found the cause to make Rapid SCADA Archive suddenly became Not Ready. Pls advice for what setting should I do to make the Rapid SCADA or PostgreSQL to resume the data storing process after PC restart/resume?

    Thank you.

    #14228
    Mikhail
    Moderator

    Hi,
    It seems that we are close to understanding the cause.
    If you restart the PC in usual way, do you get the same error?

    #14238
    kcks66
    Participant

    Hi Mikhail,

    Today the PC experienced power supply tripped. The Rapid SCADA Archive became Not Ready after PC auto restart when power supply resumed. However the MinCopy Achieve is Ready.

    https://ibb.co/R02v4yJ

    This round I stop and start SCADA-Serve without uploading the project. The Rapid SCADA Archive became Ready back.

    I use pgAdmin to connect to the database and open the data tables during Rapid SCADA Archive Not Ready, it just blank.

    Look’s like the Rapid SCADA Archive always become Not Ready if PC experienced shutdown and resume back, for Archive setup using PostgreSQL as main database.

    Pls advice for the counter measure can be taken to avoid this incident from happened again in the future.

    Thank you.

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.