Open coolshun opened 6 months ago
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:
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.
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.
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.
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.
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.
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.
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.
maybe it was because immediately report task executed completed in webhook.
`
[HttpPost("run-task")]
public async Task
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();
}
`
In stress testing, there were some task have not been started.Poor support for high concurrency.