Rust-rocket Match of request took very long (5 min)

Viewed 139

I have a small rocket application which has some get Controller.

One time a request took far too long and when I looked into the logs it was the time between getting the GET request and matching it with a controller:

Hear are the log entries:

>[2020-02-24][16:11:30][rocket::rocket][INFO] GET /check_sequence/AGV2 application/json:
>[2020-02-24][16:16:28][_][INFO] Matched: GET /check_sequence/<agv_id> (check_sequence)

You can see that it started at 16:11:30 and matched at 16:16:28.

That are five minutes apart. I have only 5 controllers with which he could try to match.

here is the code for the controller:

#[get("/check_sequence/<agv_id>")]
pub fn check_sequence(agv_id: String) ->  Result<Json<AgvResponse>,Status> {
    let database_connection = database_connection_factory::get_connection();
    return calc_route_for_sequence(&database_connection, agv_id);
}

this is the rocket code in my main (i removed all routes apart from the sequence_check):

rocket::ignite().mount("/", routes![check_sequence]).launch();

Does somebody had the same error or know where the problem could be? And is it possible to see more logs from rocket so i could pin point the error my self?

0 Answers
Related