performance issue
See original GitHub issueDescription:
EnergySubscriber.UseApplicationMessageReceivedHandler(e =>
{
Task.Run(async () =>
{
Console.WriteLine("message received");
Console.WriteLine(DateTimeOffset.UtcNow.ToString());
var message = Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
await ProcessEnergyMQTTMessage(message);
});
});
Above given code snippet, working perfectly in vs debug mode, processing every message coming completely from the publisher. But when I run the same code in K8s pods, it received the message but process the message partially. Every time it behaves differently (i mean, it processes the message 30%, 40%, 60%, 90%), a few time it completed the process, save it into DB.
But if I removed the task.run as code given below so it starts to process the message completely but it shows lag in telemetry.
EnergySubscriber.UseApplicationMessageReceivedHandler(e =>
{
Console.WriteLine("message received");
Console.WriteLine(DateTimeOffset.UtcNow.ToString());
var message = Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
ProcessEnergyMQTTMessage(message).Wait();
});
Please help to run this code with task.run
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Dealing with Performance Problems
Types of Performance Problems ; Quantity of work (untimely completion, limited production). Poor prioritizing, timing, scheduling; Lost time ; Quality of work ( ......
Read more >9 Examples of a Performance Issue
A performance issue is a failure to meet the basic requirements of a job. They are based on reasonable expectations of behavior and...
Read more >Handling Performance Issues With Grace
Low Productivity or Late Completion – Make sure you've been clear about the requirements and expectations of the job. · Poor Quality of...
Read more >Performance Issues · microsoft/vscode Wiki
The following sections describe how you can narrow down a performance issue. Visual Studio Code is consuming a lot of CPU. High CPU...
Read more >Performance Issue Root-Cause Diagnostic
Tool Overview: Accurately assessing employee performance issues is a critical part of providing high-quality performance evaluations.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@SeppPenner I find out the reason, actually DB connection is not getting free, so I am working on optimizing long-running queries. hopefully, it would resolve the problem. If the issue remains the same, I will contact you. But right now I think it is not an MQTT problem. Thanks
@bilalmalik777 Does this solve your issue?