502 Bad Gateway & slow API response

Options

I noticed couple days ago that I started getting 502 errors on GET request, especially on every page refresh. I also noticed api resquest started to be slow, from light api endpoint to more complexe ones. I did not have any of these issues, let say a month ago.

Went on the Troubleshooting Performance documentation page and it seems I should be doing good with performance.

No task is running since 2 months. I used to test them A LOT unconsciously😫😓.
So do you think I have hitted performance limits? Do I already need to upgrade database storage ? I just started, only 3 months of real customers usage 😢.

Please help me, this is more and more noticable while using the application, thanks a lot🙏

Best Answer

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Answer ✓
    Options

    I've seen that error both myself and in State Change office hours. It means the low-level web service is failing to return, which I associate most often with being out of memory. This can happen when there are a lot of endpoints (in my experience, hundreds) in a single API group. Or if you are running heavy processes in your endpoints that are driving a lot of memory usage.

    Memory in a xano instance is fixed - like it is on your local desktop/laptop. You can upgrade to get more. It might be that you need more iron to handle your load.

    But you might check out the maintenance sub-menu on the gear button on your instance. This gives you some options like flushing the internal cache, rebooting the virtual machine etc that can clear out cruft which might be holding you back.

    Hope some of the above helps!

Answers

  • Leo Med
    Leo Med Member
    Options

    I also get 404 invalid app after long time of resquest processing

    Never got that before

  • Leo Med
    Leo Med Member
    Options

    Thank you for the advice🙏. I think I must be careful with auto requests revalidation on client side now. I should then find another way to keep (almost)real time data without overloading my instance.
    I will be glad to hear if you have any trick to share. Thanks

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    Slowing the requests for updates helps. You migt try a longer polling interval or an event-based mechanism (e.g. page navigation).

    You could also look into a websocket feedback mechanism for an even-more-realtime, like say Xano calling pusher.com, and connecting your client to pusher with a bit of javascript.

    This kind of realtime data access is in the "toughest 5%" State Change members work on in our daily office hours and mentoring programs.