Hello! is there a way to change how many flow runs...
# prefect-ui
p
Hello! is there a way to change how many flow runs the UI request to the backend by default? I am getting huge payloads which cause the UI to not load any flow runs
1
n
256 mb!! that’s quite the payload. The default limit is 200, which can be configured via environment variable in Orion. However 200 isn’t that many items so I’m a little surprised to see such a massive response size
p
I have been playing with this variable but it does not make a big difference
Copy code
- name: PREFECT_API_DEFAULT_LIMIT
              value: '5'
n
Are you able to inspect that payload? It’d be interesting to see what’s causing that
r
@nicholas no gzip on anything
p
yeah, there is a run that received a large dataframe as input
I will look at it. Thanks for your help!
n
Got it @Paco Ibañez - that tracks. Even with compression, passing around dataframes that are that large is going to be pretty cumbersome for the API to handle
That said, if this is a recurring issue we’d welcome an issue or contribution for adding something like compression middleware to the fast api router
r
compression will help in general, lots of history calls at 50/60kbs
z
We should cap the size of tracked parameters for sure
👍 1
n
@Paco Ibañez - we just merged this PR which adds compression middleware to the API; it’ll go out with the next release but you can pull in the
main
branch and use it in the meantime
r
@nicholas cool - this not be easier on the web server?
n
Hi @redsquare - I’m sorry I don’t quite understand your question
r
sorry - I meant as in nginx/haproxy/whatever you use or similar rather than placing the burden on app middleware/python
n
The open-source uses uvicorn as a webserver, which afaik doesn’t have an option to do that. If you’ve got something in mind you’d like to see, feel free to open a ticket or PR with that instead
r
@nicholas no its cool - was just interested:)
p
great, thanks for the info!