Skip to content

default api/json?depth=1 cause timeout #220

Description

@suchasplus

due to jenkins api desc:

Another way to retrieve more data is to use the depth=N query parameter . This retrieves all the data up to the specified depth. Compare depth=0 and depth=1 and see what the difference is for yourself. Also note that data created by a smaller depth value is always a subset of the data created by a bigger depth value.

Because of the size of the data, the depth parameter should really be only used to explore what data Jenkins can return. Once you identify the data you want to retrieve, you can then come up with the tree parameter to exactly specify the data you need.

in a product env, jenkins always has many jobs/builds. and i always got a 504 Gateway Timeout when retrieve $domain/jenkins/api/json/?depth=1 behind nginx in online jenkins env ( 40+ jobs, 10000+ builds)
Should we disable depth=1 by default ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions