Thread
#prefect-server
    Stéphan Taljaard

    Stéphan Taljaard

    7 months ago
    Hey. Anyone that can point out if there's a gotcha I missed here? I created a flow to get a flow run (by name)'s logs and email them to a user. I figured out the GQL query in the
    Interactive API
    tab on the Server page. I then moved it to my flow. When running the flow, I'm getting
    ReadTimeoutError: HTTPConnectionPool(host='localhost', port=4200): Read timed out. (read timeout=15)
    It's strange to me, because I'm using default port/other settings, and expect it to work since the
    Interactive API
    gives a result almost immediately
    Query in question:
    query GetFlowRunLogs($flow_run_name: String) {
      flow_run(where: {name: {_eq: $flow_run_name}}){
        logs {
          created
          level
          message
        }
      }
    }
    Variables:
    {
      "flow_run_name": "stalwart-ostrich"
    }
    Something like this would probably be more helpful:
    query GetFlowRunLogs($flow_run_name: String) {
      flow_run(where: {name: {_eq: $flow_run_name}}){
    		task_runs(order_by: {start_time: asc}){
          task{
            name
            slug
            id
          }
          start_time
          logs(order_by: {timestamp: asc}){
          	level
          	message
          }
        }
      }
    }
    But the timeout still happens
    Kevin Kho

    Kevin Kho

    7 months ago
    Yeah this looks like the query is really just too long. You can increase the read_timeout though on Server.
    See this
    I think it just might be related to latency downloading the output from a remote location?
    Stéphan Taljaard

    Stéphan Taljaard

    7 months ago
    I can try out tomorrow and see what happens if I up the timeout But it still feels strange to me. Through the Prefect Server, it still communicates with the server through graphql, same as in the flow. It follows the same route. Both go to and from the same locations
    Kevin Kho

    Kevin Kho

    7 months ago
    I think using the interactive API tab might add limits by default but your query doesnt have any?
    Stéphan Taljaard

    Stéphan Taljaard

    7 months ago
    I guess that's possible, but I'll need to dig through Server's code to find if that is the case
    I'll let you know tomorrow if I find something
    I did not get a chance to look at this today
    Kevin Kho

    Kevin Kho

    7 months ago
    No worries 😆