[
https://issues.apache.org/jira/browse/AIRFLOW-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202064#comment-17202064
]
Daniel Tebernum commented on AIRFLOW-4238:
------------------------------------------
We are currently also facing this issue.
[~colini] did you successfully change the line?
Is the solution fixed? If yes, a new release would be awesome. We currently use
this Docker
[Release|[https://hub.docker.com/layers/puckel/docker-airflow/1.10.9/images/sha256-30e7cb9744ad367c54ae30a379fa46c9df4ea582bf2fcb96604adfc2760be79a?context=explore],]
but I think we can switch easily.
> Experimental API sometimes responds with Bad Request
> ----------------------------------------------------
>
> Key: AIRFLOW-4238
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4238
> Project: Apache Airflow
> Issue Type: Bug
> Components: api
> Affects Versions: 1.10.2
> Reporter: Roger Lahaije
> Priority: Minor
>
> We wanted to use the Airflow api to start Dag runs.
> During implementation we notices the API sometimes responded with error 400
> bad request.
> The bad request appear to happen when calls are made fast after oneanother.
>
> The following code can reproduce the bad requests
> {code:java}
> import requests
> import json
> from datetime import datetime
> start_time = datetime.now()
> def millis():
> dt = datetime.now() - start_time
> ms = (dt.days * 24 * 60 * 60 + dt.seconds) * 1000 + dt.microseconds /
> 1000.0
> return round(ms)
> url = f'http://localhost/api/experimental/dags/some dag/dag_runs'
> for i in range(1, 40):
> r = requests.post(url, json={'conf': {'run_task': 1}})
> print(f"{millis()} {r.status_code}")
> sleep(0.4)
> >> results
> 132 200
> 561 400
> 1006 200
> 1425 400
> 1870 200
> 2295 400
> 2738 200
> 3171 400
> 3594 400
> 4039 200
> ...{code}
>
> It looks like it's only possible to call the api a maximum of once a second,
> which is probably due to the fact dags can only be started once a second.
>
> Is there any way we can call the API more than 1 time a second?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)