504 gateway Timeout issue

Hi, My website is having problem when too many request are being made and throws 504 gateway timeout. this only happens when too many requests are sent. i have hosted on Aws and contacted them and they said to contact the cloudflare. please help me find out the solution to this problem. As you can see in the screenshot below it was working fine and then suddenly 504 gateway timeout

Greetings!

May I ask is this website behavior still happening or has been resolved in the meantime?

I am sorry to hear that you are experiencing issues/errors with your Website while using Cloudflare service.

It could be that your origin host / server obviously cannot handle all the requests made to it (be it for example PHP, etc.).

Have you tried contacting your web hosting provider so far?

In terms of the stated error you are experiencing, may I suggest looking into below articles:

UPDATE:
Seems you are using Laravel app (uses and requires PHP at the backend to handle all the requests)