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

How to catch "Local: Maximum application poll interval (max.poll.interval.ms) exceeded" error ? #470

Open
askie opened this issue Oct 20, 2021 · 1 comment

Comments

@askie
Copy link

askie commented Oct 20, 2021

  • PHP version: 7.1
  • librdkafka version: 1.8.2.255
  • php-rdkafka version: 5.0
  • kafka version: 2

my configuration:

<?php
$conf = new RdKafka\Conf();
// Add the two settings below for a more verbose output
$conf->set('log_level', (string) LOG_DEBUG);
$conf->set('debug', 'all');

 $conf->set('enable.auto.commit', 'false');
$conf->set('max.poll.interval.ms', 6000);

when callback function sleep more then 6000ms
log show:

%4|1634714275.038|MAXPOLL|rdkafka#consumer-1| [thrd:main]: Application maximum poll interval (8000ms) exceeded by 494ms (adjust max.poll.interval.ms for long-running message processing): leaving group

and the $consumer is still working in CLI ,
how can I catch the error to restart $consumer in CLI ?

==================
if set :
$conf->set('enable.auto.commit', 'true');

when $consupmer exec more then 6000ms , will get a Exception:
Local: Maximum application poll interval (max.poll.interval.ms) exceeded

this is what I want to catch.

@chrisfield490
Copy link

I know this is two years ago, but i am running debian buster with:
PHP 7.4.30
librdkafka 0.11.6-1.1
php-rdkafka 6.0.3
kafka_2.13.-2.8.0

We see the above error when running our php from the command line, we have left the code running for 30 mins without the script stopping, even though we can see the consumer has stopped the connection to the topic.

How do we get the script to end when throwing the exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants