Bug #36835


Timeout for "hammer --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1"

Added by Ian Ballou 8 months ago. Updated 8 months ago.

Errata Management
Target version:
Fixed in Releases:
Found in Releases:


Cloned from

Description of problem:
Error via hammer when running the command below
hammer d --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1

Version-Release number of selected component (if applicable):
Katello 4.5

How reproducible:
100% ~ 7000 errata applicable to 10k hosts

Steps to Reproduce:
1. Create an environment with ~ 7000 errata applicable to 10k hosts (or perhaps reduce the puma worker timeout to be very small)
2. Execute the command

Actual results:
There is an issue as presented below
[ERROR 2023-10-13T00:54:08 API] 502 Bad Gateway
[DEBUG 2023-10-13T00:54:08 API] "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>502 Proxy Error</title>\n</head><body>\n<h1>Proxy Error</h1>\n<p>The proxy server received an invalid\r\nresponse from an upstream server.<br />\r\nThe proxy server could not handle the request <em><a href=\"/katello/api/errata\">GET /katello/api/errata</a></em>.<p>\nReason: <strong>Error reading from remote server</strong></p></p>\n</body></html>\n"
[DEBUG 2023-10-13T00:54:08 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_general_exception
[ERROR 2023-10-13T00:54:08 Exception] Error: 502 Bad Gateway
Error: 502 Bad Gateway
[ERROR 2023-10-13T00:54:08 Exception]

RestClient::BadGateway (502 Bad Gateway):
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:353:in `block in rest_client_call_block'

and on httpd logs
[Fri Oct 13 00:54:08.298157 2023] [proxy_http:error] [pid 127044] (20014)Internal error: [client] AH01102: error reading status line from remote server httpd-UDS:0
[Fri Oct 13 00:54:08.298467 2023] [proxy:error] [pid 127044] [client] AH00898: Error reading from remote server returned by /katello/api/errata

Expected results:
The complete report

Additional info:

The issue seems to be that the applicable errata filtering relies too heavily on the web server rather than postgres. The timeout is resolved if duplicate errata entries are made distinct by postgres. See the PR for more info.

Actions #1

Updated by The Foreman Bot 8 months ago

  • Status changed from New to Ready For Testing
  • Pull request added
Actions #2

Updated by Samir Jha 8 months ago

  • Subject changed from Timeout for "hammer --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1" to Timeout for "hammer --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1"
  • Target version set to Katello 4.11.0
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot 8 months ago

  • Fixed in Releases Katello 4.11.0 added
Actions #4

Updated by Anonymous 8 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF