Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webserver crashes after few API calls from external server after upgrade to 0.15.8 #3402

Open
aballiet opened this issue Mar 27, 2024 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@aballiet
Copy link
Contributor

aballiet commented Mar 27, 2024

Describe the issue

Webserver was working fine in 0.14.4, after upgrading to 0.15.8, webserver systematically crashes after few API calls (2 calls).

We tried a bunch of things and noticed the server struggles globally.

Here is an example of a flow which created a lot of scaling events on Kestra server and can make it crash :

id: kestra-webserver-crasher
namespace: dev
tasks:
- id: spike-webserver-memory
  type: io.kestra.plugin.scripts.python.Script
  runner: PROCESS
  beforeCommands:
  - "pip install requests > /dev/null"
  warningOnStdErr: false
  docker:
    pullPolicy: ALWAYS
  script: |
    import requests

    BASE_SERVICE_URL = "http://kestra-service.kestra:8080/"

    # Get all running excections
    search = {"size":20}
    response = requests.get(f"{BASE_SERVICE_URL}/api/v1/executions/search", params=search)
    total = response.json()["total"]
    if total == 0:
        print("No executions currently running")
    else:
        print(f"{total} executions to fetch logs for")
        executions = [
            {"id": result["id"], "flow": result["flowId"], "namespace": result["namespace"]}
            for result in response.json()["results"]
        ]
        for execution in executions:
            id = execution["id"]
            log_search = {"q": ""}
            logs = requests.get(f"{BASE_SERVICE_URL}/api/v1/logs/{id}", params=log_search)
            print(logs)

Environment

  • Kestra Version: 0.15.8 (also tested with 0.15.9, same issue)
  • Operating System (OS/Docker/Kubernetes): Kubernetes
  • Java Version (if you don't run kestra in Docker):
@aballiet aballiet added the bug Something isn't working label Mar 27, 2024
@loicmathieu
Copy link
Member

Hi,
Do you have some logs on the Kestra webserver side?

@loicmathieu loicmathieu added this to the v0.17.0 milestone Mar 27, 2024
@aballiet
Copy link
Contributor Author

updated the issue @loicmathieu

@loicmathieu loicmathieu self-assigned this Mar 28, 2024
@loicmathieu loicmathieu modified the milestones: v0.17.0, v0.16.0 Mar 28, 2024
@loicmathieu
Copy link
Member

loicmathieu commented Apr 9, 2024

There is a workaround with the following configuration:

  micronaut:
    server:
      max-request-size: 1GB
      netty:
        server-type: full_content

But it would limit the request size to 1GB and silently ignore bigger requests, this can be an issue if you start a flow with total inputs size of more than 1GB.

We're still working with the Micronaut team to find a proper fix, see micronaut-projects/micronaut-core#10677

@loicmathieu loicmathieu modified the milestones: v0.16.0, v0.17.0 Apr 10, 2024
@tchiotludo
Copy link
Member

@aballiet do you still have the issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants