Spoje-NET / Spoje-NET/php-abraflexi

Curl Error (HTTP 0): getaddrinfo() thread failed to start

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted invalid
Dominant language
PHP
Stars
24
Forks
13
PR merge metrics
No merged PRs in 30d

Description

There is some problem with curl and closing its open filedescriptors :(

PHP Warning:  include(/usr/share/php/AbraFlexi/Exception.php): Failed to open stream: Too many open files in /var/lib/composer/discomp2abraflexi/composer/ClassLoader.php on line 576
PHP Stack trace:
PHP   1. {main}() /usr/share/discomp2abraflexi/discomp2abraflexi.php:0
PHP   2. SpojeNet\\Discomp\\Importer->freshItems() /usr/share/discomp2abraflexi/discomp2abraflexi.php:34
PHP   3. SpojeNet\\Discomp\\Importer->prepareCategories($categoriesRaw = [0 => \'Druhy > Počítače > PC komponenty > Paměti > DDR4 > 4GB\', 1 => \'Vyrobci - WEB > TRANSCEND > Počítače > PC komponenty > Paměti > DDR4 > 4GB\']) /usr/share/discomp2abraflexi/Discomp/Importer.php:284
PHP   4. SpojeNet\\Discomp\\Importer->categoryBranch($nodes = [0 => \'Discomp\', 1 => \'Vyrobci - WEB\', 2 => \'TRANSCEND\', 3 => \'Počítače\', 4 => \'PC komponenty\', 5 => \'Paměti\', 6 => \'DDR4\', 7 => \'4GB\']) /usr/share/discomp2abraflexi/Discomp/Importer.php:543
PHP   5. SpojeNet\\Discomp\\Importer->createBranchNode($node = \'Discomp\', $level = 0, $parent = \'\', $kod = \'39797b8d0f122a4f69bd1d29c202b691\') /usr/share/discomp2abraflexi/Discomp/Importer.php:559
PHP   6. AbraFlexi\\RO->__construct($init = \'code:39797B8D0F122A4F69BD1D29C202B6\', $options = [\'ignore404\' => TRUE]) /usr/share/discomp2abraflexi/Discomp/Importer.php:582
PHP   7. AbraFlexi\\RO->processInit($init = \'code:39797B8D0F122A4F69BD1D29C202B6\') /usr/share/php/AbraFlexi/RO.php:438
PHP   8. AbraFlexi\\RO->loadFromAbraFlexi($id = \'code:39797B8D0F122A4F69BD1D29C202B6\') /usr/share/php/AbraFlexi/RO.php:635
PHP   9. AbraFlexi\\RO->getFlexiData($suffix = \'https://server:5434/c/company/strom/code:39797B8D0F122A4F69BD1D29C202B6\', $conditions = \'\') /usr/share/php/AbraFlexi/RO.php:1558
PHP  10. AbraFlexi\\RO->performRequest($urlSuffix = \'https://server:5434/c/company/strom/code:39797B8D0F122A4F69BD1D29C202B6\', $method = \'GET\', $format = *uninitialized*) /usr/share/php/AbraFlexi/RO.php:1522
PHP  11. AbraFlexi\\RO->doCurlRequest($url = \'https://server:5434/c/company/strom/code:39797B8D0F122A4F69BD1D29C202B6\', $method = \'GET\', $format = NULL) /usr/share/php/AbraFlexi/RO.php:997
PHP  12. Composer\\Autoload\\ClassLoader->loadClass($class = \'AbraFlexi\\\\Exception\') /usr/share/php/AbraFlexi/RO.php:1302
PHP  13. Composer\\Autoload\\{closure:/var/lib/composer/discomp2abraflexi/composer/ClassLoader.php:575-577}($file = \'/var/lib/composer/discomp2abraflexi/composer/../deb/abraflexi/Exception.php\') /var/lib/composer/discomp2abraflexi/composer/ClassLoader.php:427

https://github.com/Spoje-NET/discomp2abraflexi

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in AbraFlexi/RO.php around doCurlRequest() at line 997 and the request path through performRequest() and getFlexiData(), using the provided stack trace. Compare this with the discomp2abraflexi importer calls shown in the report and determine why repeated requests exhaust file descriptors and produce HTTP 0; done means the failure is prevented or handled correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.