Schedule API workflow on a list take long time to CREATE multiple things

Hi,

Is there a change in interval time when creating multiple thing with API workflow?

It take longer time than before to create 5 line of records in DB. (approximate 10 seconds which is weird to show to customer when the records show up a few seconds.)

Regards.

Agreed, I tried setting it to zero (and got a warning message). Seems faster.

1 Like

We have to do this to maintain the systems’ health (and I think we have a few warnings in the UI saying that). You shouldn’t be using this expecting an immediate turnaround.

To maintain healthy system functioning, we may schedule calls further apart.

@emmanuel, do you have benchmarks (e.g., median, bottom 10%, bottom 1% performance) for the duration of time this takes based on the # of things being created? Even best guess estimates would be valuable. Thanks!

We don’t. It can go up to a few minutes between each entry if the server is under high pressure. Again, our documentation states clearly that this action should not be used with the expectation it’s instantaneous.

Users on a dedicated plan can have a different limit, as it’s only their cluster that is impacted.

2 Likes

Thanks. It’s useful for me to know it could take a much as a few mins for a small set of records.

this is quite a limitation for bubble as for now we are not allow to create multiple things instantly which i thought we can do this earlier on. What is the work around for this, if i wish to create 5 records from a list which almost instantly (few minutes is just too long if server heavy loaded)

I think the answer is to be defensive about how long this will take, and build round it.

So either create things on page load which are then updated, or create them in the background and only display when the user goes to another page.

@emmanuel What option do we have for speeding up scheduled APIs?

I’m trying to calculate some statistics on my data and I can see these scheduled APIs scheduled out for like 1 or 2 days because they only kick off every now and then. How do I get them done faster?

Is it just a matter of buying more capacity? If I buy more capacity will they still be scheduled with arbitrary delays anyway? Do I have to get my own cluster?

Right now the way people have used higher frequency is with a dedicated cluster, yes. Now even then, we need to have security measures so that the system doesn’t go down (but it’s more flexible than the shared cluster).

So any of the plans with any amount of capacity is still going to schedule APIs with arbitrary delays between them?

The way to schedule APIs a lot closer together, which is the only way to iterate calculations over a list, is to get a dedicated cluster?

What sort of cost and performance can we expect from a dedicated cluster?

If this bottlenecks things for you. concider getting a small node.js service written on runkit.com ,the micro webservice could iterate for you and write back to the bubble DB via a regular API call. Would probably be worth the money if you dont really need dedicated and you need speed.

@gurun @NigelG @blueback09

So ive been pondering this, im just wondering if its possible to action this in the workflow. Maybe not for every eventuality

so in this example ive got a RG…i was needing to interate through the RG cells and apply the incremental slide index number…id used a workflow… then i wrote some PHP…passed the RG list of Unique ID and got back the position in order… i just cant seem to update the DB is this fashion… not sure its possible via the workflow. if you hit the submit button it shows the return JSOn list

https://listnumupdatelistrg.bubbleapps.io/version-test/api_route?debug_mode=true

https://bubble.io/page?type=page&name=api_route&id=listnumupdatelistrg&tab=tabs-1

You need to share your editor.

#1 How many items in RG are we talking that you want to loop through?

#2 So you want to drag and drop sort, then save the new order back to db?

what about storing a custom action trigger in each RG element? I need to understand the flow completely first. Its still a bit vague. Could you share a draw.io flowchart with intended flow? :slight_smile:

@gurun Ive update the links so they are correctly formatted.

if you go to the index page the alternative approaches using a list of numbers through workflow. Even on a relatively small list like this it takes too long from a usability perspective. The PHP script return a JSON of aany field in the repeating group… In this case I am using the Unique iD …even long list execute quickly. I am sure there is a way to update corresponding Thing with its unique ID and in this case the corresponding index number. Alternatively if it’s not possible in the workflow then instead of using a GET on getting the JSON response I could make a PATCH and use the modify data API directly into the DB

I think the only way ive foound is to use the modify Data API and make this a PATCH which is far quicker than a scheduled workflow…ive not found a way to action this as workflow

When I had very few people active on my cluster earlier in the year, I was able to schedule API worfklows on lists 1 second apart consistently. It’s now averaging 4-5 seconds, and in most cases, I set it at 5 seconds minimum in the workflow settings so that no single user can take up too much ‘bandwidth’.

In order to relieve a lot of stress from the end user perspective (especially when running operations on large lists) I’ve created a countdown notification of sorts that pops up:

0b21a95e997eac6a47b4654781f668c9

I’m no longer hearing complaints from super active users (in one case someone had attempted to schedule thousands of workflows in frustration since they did indeed expect an immediate turnaround).

  1. Create workflow on starter element (probably a click event) that pre-calculates (Do a search for…:count) the total number of API workflows you plan on scheduling – save this value to a custom state OR on the Current User in the database

  2. Within the API workflow itself, add a new Make changes to a thing (whatever thing you saved the previous :count to) – the new value will equal the existing value minus 1.

  3. Create an area on the screen where a user can see the existing value’s count, and just state what it is that’s counting down.

1 Like

Thanks for this @philip! What plan are you using that you’re able to run the workflow on so many records? I need to run about as many, and yet I’m making-out between 6 and 20.

I am on an entry-level dedicated plan (technically considered a legacy account, the specs for new customers are likely different). As soon as I started taking on paying clients in one of my apps it was pretty crucial to have as close to 100% uptime as possible. So far Bubble has delivered. The added horsepower for workflows makes life a bit easier too :slight_smile:

2 Likes