Performance issues on random requests

Options

Hi,

I am seeing veeery slow (up to 14 seconds, sometimes around 5s) requests on some of my endpoints regularly. But when I use the given parameters to test the query, it is quite ok with ~0.6-1s.

endpoin 1:

endpoint 2:

How can I find out what the problem could be? Is there a way to have a “Explain query” like function like in mysql?

Tagged:

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Hey @Stefan Pointecker - please check out our documentation on diagnosing a slow API response (https://docs.xano.com/api/api-performance/troubleshooting-a-slow-response). There could be multiple factors at play but I'd start there.

    Your API request history will tell you the timing of every item in your function stack, the inputs, etc. So you can start to narrow in on what might've been slow. This and more is detailed in the linked documentation

  • Stefan Pointecker
    Options

    Hi @Michael Udinski,

    I had a look but my situation is not documented: My endpoint is only sometimes slow, and if I run the slow request it is not slow 😅. So I can not reproduce the issue.

    Instance usage is very low (always around 10%).

    I know that the issue causing the slowness is the query in the endpoint itself. (Not much more happening in the endpoints).

    So what I would need is some sort of query debugging, but I guess that is not possible.

    Is there caching used when using the run & debug function?

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Run & debug does not use caching. Do your inputs change when you notice the difference?

  • Stefan Pointecker
    Options

    There are various differnt input variants where slow requests happen. So I do not see a pattern here.

    I just filtered for requests >5seconds and saw that it is happening on various different endpoints.