Task times out at 20s with many update aliases

Trying to run a task that needs to update ~2,800 records.

This used to work fine before the Payment system was changed to charge differently for functions. I’m guessing There was put a hard 20 second limit in there, that wasn’t there before? or limited the performance of the functions so they can’t finish the task within 20 seconds.

I was previously told to use aliases to update MANY records, as there is no UpdateMany functionality in 8base. So this is what I’m doing. It used to work, now it doesn’t :frowning:

I generate my mutation like this:

mutation UPDATE_AI_REPORTS_MUTATION($RGLS_scores: JSON,$RGA_scores: JSON) {
RGLS: aIReportUpdate(filter: { ticker: "RGLS" }, data: {
        ticker: "RGLS",
        name: "Regulus Therapeutics Inc.",
        scores: $RGLS_scores,
        price: 1.29,
        date: "2020-01-08",
        marketCap: 11.2475,
        aIScore: -0.855133
        }) { ticker }RGA: aIReportUpdate(filter: { ticker: "RGA" }, data: {
        ticker: "RGA",
        name: "Reinsurance Group of America Incorporated",
        scores: $RGA_scores,
        price: 159.15,
        date: "2020-01-08",
        marketCap: 10359.7,
        aIScore: -0.232467
        }) { ticker }
}

Where the variables are generated like this:

{
  RGLS_scores: {
    ai_soundness: -0.818182,
    ai_stewardship: -0.75,
    ai_profitability: -0.714286,
    ai_growth: -0.25,
    ai_value: -0.636364,
    ai_reward: -0.855133,
    ai_safety: -1,
    ai_score: -0.855133
  },
  RGA_scores: {
    ai_soundness: 0.0909091,
    ai_stewardship: 0.25,
    ai_profitability: -0.428571,
    ai_growth: 0,
    ai_value: -0.818182,
    ai_reward: 0.117533,
    ai_safety: 0.0006,
    ai_score: -0.232467
  }
}

As far as I can tell this is valid, and it works fine if I do it with just a few update aliases. But now when I scale this to ~2.8k records. My task just keeps timing out at 20 seconds…

If you’re not going to provide a faster way to run this function, there should at least be a way to increase the timeout period to a reasonable amount? Or am I doing something completely wrong?

It’s very concerning that a function like this used to work just fine and now it breaks? Stability is one of the main factors you expect from a service like 8base. If I don’t change my function, the function REALLY shouldn’t break due to an update from 8base???

Please help fix this.

Hey Mark! We’ve always had a timeout on functions… so that’s odd that it used to run for long-running calls.

@evgeny.semushin any ideas what might have changed?

1 Like

@sebastian.scholl @evgeny.semushin any news / ideas why this isn’t working anymore?

Hey @MarkLyck - we looked into it and it seems that all the functions were originally completing in less that the 20-second timeout limit, whereas now you’re running functions with a lot more data which are hitting the 20-second timeout.

We plan on updating functions so that you can specify the timeout manually and then incur billing accordingly, however right now the 20-second limit is static.

Are you able to break up your job into batches of updating, lets say 100 records at a time? That would probably be the best approach for now.