s

    Sherwin Mascarenhas

    1 month ago
    Hi Everyone, I have a service that is sending metrics to my Questdb instance (Version: 6.4.2) using the LineUdpSender, and everything is working as expected. However as part of our data retention policy we would like to delete partitions that are a few days old, but are facing problems when running the following query, ALTER TABLE '{table_name}' DROP PARTITION LIST '2022-08-15', on the UI. From the logs, I see the following error: JsonQueryProcessorState [179] waiting for update query JsonQueryProcessor [fd=179] Resource busy, will retry JsonQueryProcessorState [179] syntax-error [q=
    ALTER TABLE '{table_name}' DROP PARTITION LIST '2022-08-15'
    , at=0, message=
    Query timeout. Please add HTTP header 'Statement-Timeout' with timeout in msQuery timeout. Please add HTTP header 'Statement-Timeout' with timeout in msTimeout expired on waiting for the async command execution result [instance=8]Timeout expired on waiting for the async command execution result [instance=9]Query timeout. Please add HTTP header 'Statement-Timeout' with timeout in msQuery timeout. Please add HTTP header 'Statement-Timeout' with timeout in msQuery timeout. Please add HTTP header 'Statement-Timeout' with timeout in msQuery timeout. Please add HTTP header 'Statement-Timeout' with timeout in ms
    ]
    From the looks of it, the table cannot process the alter table request, because all the resources are busy. However, when I look at the cpu and memory usage of the quest db instance, it is using minimal resources.
    Alex Pelagenko

    Alex Pelagenko

    1 month ago
    busy here means table is used to write data, perhaps in ILP
    you can set the timeout header to few mins as the message suggests
    s

    Sherwin Mascarenhas

    1 month ago
    I did try increasing it on a python script that used the postgres protocol to run the alter table query to no avail. Do you know how the timeout header can be set on the quest db ui?
    Alex Pelagenko

    Alex Pelagenko

    1 month ago
    no, no in ui. You can use curl though
    s

    Sherwin Mascarenhas

    1 month ago
    Don't think this is a timeout issue, I ran the following curl command: curl -G -H "Statement-Timeout: 120000000" --data-urlencode "query=ALTER TABLE 'table_name' DROP PARTITION LIST '2022-08-15'" http://localhost:9000/exec
    And the error gets thrown back in a matter of seconds, the same error as given in the logs
    I also see that it's a similar error to the following issue: https://github.com/questdb/questdb/issues/1489 However, this issue was fixed in one of the version 6.1 releases over here: https://github.com/questdb/questdb/pull/1504, so I don't understand why with version 6.4 of quest I still face a similar problem
    Alex Pelagenko

    Alex Pelagenko

    1 month ago
    ah, for alters timeout is set in server conf
    # Maximum wait timeout on ALTER TABLE SQL from REST, PgWire interfaces when statement execution is ASYNCHRONOUS
    #cairo.writer.alter.busy.wait.timeout.micro=500000
    it’s half a second by default
    s

    Sherwin Mascarenhas

    1 month ago
    Ahh okay so I would need to change that in server. conf
    Great, I will try that and let you know if that works for me!
    c

    colle88

    1 month ago
    hi Sherwin
    I have your same problem
    did you fix it?
    s

    Sherwin Mascarenhas

    1 month ago
    @Alex Pelagenko that did not work for me as well. While it did extend the timeout period, from the logs I see that it just kept throwing resource busy error, and it ran for over two minutes.
    Alex Pelagenko

    Alex Pelagenko

    1 month ago
    ok, are you writing using UDP?
    s

    Sherwin Mascarenhas

    1 month ago
    Yes I am
    Alex Pelagenko

    Alex Pelagenko

    1 month ago