question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object reference null while trying to produce to topic on higher loads during perf testing

See original GitHub issue

Description

We are doing performance testing and trying to produce around 24 million messages to a topic with Partition Count 36 and Replication Factor 3. We are calling ProduceAsync method to push messages. We are getting below exception on higher loads:

System.NullReferenceException: Object reference not set to an instance of an object. at Confluent.Kafka.Impl.SafeKafkaHandle.marshalHeaders(IEnumerable1 headers) at Confluent.Kafka.Impl.SafeKafkaHandle.Produce(String topic, Byte[] val, Int32 valOffset, Int32 valLength, Byte[] key, Int32 keyOffset, Int32 keyLength, Int32 partition, Int64 timestamp, IEnumerable1 headers, IntPtr opaque) at Confluent.Kafka.Producer2.ProduceImpl(String topic, Byte[] val, Int32 valOffset, Int32 valLength, Byte[] key, Int32 keyOffset, Int32 keyLength, Timestamp timestamp, Partition partition, IEnumerable1 headers, IDeliveryHandler deliveryHandler) at Confluent.Kafka.Producer2.ProduceAsync(TopicPartition topicPartition, Message2 message, CancellationToken cancellationToken)

How to reproduce

Checklist

  1. Confluent.Kafka 1.7.0.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CwPiyushcommented, Oct 14, 2022

We went with other alternatives. I am closing the ticket for now.

0reactions
anchitjcommented, Oct 14, 2022

@CwPiyush I tried to reproduce the issue locally on my system with 25M messages having headers, partition count= 36, and replication factor = 3 with the Benchmark test and didn’t face any troubles in Producer.

To further help in the investigation, can you please do:

  1. Provide the sample code for your producer with the configuration that you are testing with?
  2. Can you try running Benchmark test as well and see if it errors out or not?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my method returning a null object reference in ...
I am trying to test that when the user clicks on an item in the RecyclerView, the correct data is shown. However, I...
Read more >
What is a Null Reference Exception?
A NullReferenceException happens when you try to access a reference variable that isn't referencing any object. If a reference variable isn't referencing an ......
Read more >
I'm tryin to move my site to production, but I'm getting a Null ...
Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request.
Read more >
Bug - Null References ONLY in Build
I am receiving game-breaking null reference exceptions in my build. In the editor, there are no issues. I only have two scenes to...
Read more >
Deprecation of '==' operator overload and fake null for ...
Nope, the issue is that if you just declare a public field in a MonoBehaviour, its value is not a null C# reference,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found