Bug 1275422
Summary: | Bugzilla.getProducts() method throws 502 Server Error: proxy error for url: https://bugzilla.redhat.com/xmlrpc.cgi | ||
---|---|---|---|
Product: | [Community] Bugzilla | Reporter: | Spam Kicha <spamkicha> |
Component: | Bugzilla General | Assignee: | PnT DevOps Devs <hss-ied-bugs> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.4 | CC: | crobinso, dzickus, jmcdonal, jskarvad, mtahir, qgong, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Mac OS | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-05 01:58:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Spam Kicha
2015-10-26 21:11:39 UTC
This isn't anything specific to python-bugzilla: the bare Products.get() call hits the proxy error AKA timeout because it is trying to return a ton of data: info on every product and every component However if you tell Product.get to only return product names for example, it takes under 3 seconds: $ cat test.py import bugzilla bzapi = bugzilla.Bugzilla("bugzilla.redhat.com") bzapi.getproducts(include_fields=["name"]) $ time python test.py real 0m2.390s user 0m0.148s sys 0m0.039s So moving this back to bugzilla.redhat.com but I don't know if there's really any 'fix' here In my opinion, this is not a bug in BZ per-se, but rather an over-ambitious use of the API. I am not currently aware of any valid use-cases that require fetching all product metadata for all products in Red Hat Bugzilla in one go. If you really do need to get data for all products, I would be interested to hear more about your use-case. Note that approximately one-third of the products in the database are retired, and it's rare that anybody needs to fetch data about those. Second, some of the active products contain very large lists of components, and I believe that these are the main reason for the call timing out. Fedora has ~18,000 components. Each RHEL version has a few thousand. If you only need to know about specific products, Bugzilla will respond faster if you only request data for those products. Likewise, if you don't need all the fields, Bugzilla will respond faster if you only ask for the fields you need. In case you haven't seen it, there is some documentation for Product.get and related API calls at https://bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService/Product.html. This includes information about how to limit the fields you ask for. Hi, sorry this maybe my ignorance. I didn't expect bugzilla.getproducts() to return massive amount of data back. I was actually trying to refine my query to reduce the load on the server and wanted to get a listing of products tracked in bugzilla. Simplest way to get just the list of product names is bzapi.getproducts(include_fields=["name"]) |