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

Reduce risk of crashing the x509 collector daemon #5115

Merged
merged 1 commit into from
Sep 18, 2023

Conversation

yhabteab
Copy link
Member

To avoid such crashes:

PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array)
#2 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Adapter/Pdo/Abstract.php(265): Zend_Db_Adapter_Abstract->query('SELECT ho.name1...', Array)
#4 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Db/Select.php(724): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select))
#5 /icingaweb2/library/Icinga/Data/Db/DbConnection.php(102): Zend_Db_Select->query()
#6 /icingaweb2/library/Icinga/Data/SimpleQuery.php(168): Icinga\Data\Db\DbConnection->query(Object(Icinga\Module\Monitoring\Backend\Ido\Query\HoststatusQuery))
#7 /icingaweb2/modules/monitoring/library/Monitoring/ProvidedHook/X509/Sni.php(27): Icinga\Data\SimpleQuery->rewind()
#8 /usr/share/icingaweb2-modules/x509/library/X509/Hook/SniHook.php(32): Icinga\Module\Monitoring\ProvidedHook\X509\Sni->getHosts()
#9 /usr/share/icingaweb2-modules/x509/application/clicommands/JobsCommand.php(145): Icinga\Module\X509\Hook\SniHook::getAll()
#10 /usr/share/icingaweb2-modules/x509/application/clicommands/JobsCommand.php(84): Icinga\Module\X509\Clicommands\JobsCommand->fetchSchedules('', '')
#11 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/ExtEvLoop.php(144): Icinga\Module\X509\Clicommands\JobsCommand->Icinga\Module\X509\Clicommands\{closure}(Object(React\EventLoop\Timer\Timer))
#12 [internal function]: React\EventLoop\ExtEvLoop->React\EventLoop\{closure}()
#13 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/ExtEvLoop.php(208): EvLoop->run(2)
#14 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/Loop.php(55): React\EventLoop\ExtEvLoop->run()
#15 [internal function]: React\EventLoop\Loop::React\EventLoop\{closure}()
#16 {main}

@yhabteab yhabteab added this to the 2.12.0 milestone Sep 18, 2023
@yhabteab yhabteab requested a review from nilmerg September 18, 2023 11:51
@yhabteab yhabteab self-assigned this Sep 18, 2023
@cla-bot cla-bot bot added the cla/signed label Sep 18, 2023
@nilmerg nilmerg merged commit ac369f9 into master Sep 18, 2023
12 checks passed
@nilmerg nilmerg deleted the clear-db-instances-before-using-it branch September 18, 2023 11:58
@nilmerg nilmerg changed the title X509\Sni: Clear backend instances before performing actual DB queries Reduce risk of crashing the x509 collector daemon Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants