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

[ENH] In stress testing, there were some task have not been started. #5360

Open
coolshun opened this issue May 10, 2024 · 2 comments
Open

[ENH] In stress testing, there were some task have not been started. #5360

coolshun opened this issue May 10, 2024 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@coolshun
Copy link

In stress testing, there were some task have not been started.Poor support for high concurrency.
image

@coolshun coolshun added the enhancement New feature or request label May 10, 2024
Copy link

glime-ai bot commented May 10, 2024

To address the issue of tasks not starting during high concurrency stress testing, it's important to understand the underlying architecture and configuration of Elsa Workflows. The issue may be related to the limitations of the workflow engine under heavy load or a configuration that does not support high concurrency.

Elsa Workflows is designed to handle both short-running and long-running workflows, and it supports parallel execution of activities. However, there may be limitations based on the persistence provider used, the job scheduler configuration, and the resources available to the application.

To troubleshoot and resolve this issue, consider the following steps:

  1. Review the Configuration: Ensure that the configuration of Elsa, the job scheduler (like Hangfire), and the database is optimized for high concurrency. This may involve adjusting connection pool sizes, worker thread counts, and other relevant settings.

  2. Check for Known Issues: Review the known issues and limitations of Elsa Workflows to see if the problem you're experiencing is a recognized issue that may have a workaround or is pending a fix in a future release.

  3. Analyze the Logs: Check the application logs for any errors or warnings that may indicate why the tasks are not starting. Look for patterns or specific errors that occur when the system is under load.

  4. Optimize Database Access: If the persistence layer is a bottleneck, consider optimizing database access. This may involve indexing, query optimization, or even changing the persistence technology if necessary.

  5. Scale Out: If the application is running on a single node, consider scaling out to multiple nodes to distribute the load. Elsa 3 introduces support for a distributed runtime using Proto.Actor, which may help in achieving better concurrency.

  6. Seek Community Help: If the issue persists, consider reaching out to the Elsa community on GitHub or other forums. You can open an issue on the Elsa GitHub repository to seek assistance from the maintainers and the community.

  7. Consider Professional Support: If Elsa is critical to your business and you require immediate assistance, consider seeking professional support from the Elsa team or a consultant who specializes in workflow engines and high concurrency applications.

Please note that without access to the specific configuration and setup of your Elsa instance, as well as detailed logs and system information, it's challenging to provide a precise solution. The steps above are general guidelines to help you investigate and address the issue.

This comment was generated by Glime.

@coolshun
Copy link
Author

maybe it was because immediately report task executed completed in webhook.
`
[HttpPost("run-task")]
public async Task RunTask(WebhookEvent webhookEvent)
{
var payload = webhookEvent.Payload;
var taskPayload = payload.TaskPayload;

    var taskId = payload.TaskId;

    Task.Run(async () =>
    {
        await new ElsaClient().ReportTaskCompletedAsync(taskId, result: new { success = true });
    });

    return Ok();
}

`

@sfmskywalker sfmskywalker added the bug Something isn't working label May 10, 2024
@sfmskywalker sfmskywalker modified the milestone: Elsa 3.2 May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants