Server side api getting error 504

Hello all,
looking for help
I am getting a 504 error from a server side api when calling very long feeder(http).
Apparently there is a problem with the php scripts invoked. May be it would help if I could know which access method you are using for http call.
I am using a stack of Debian/Apache2.4/PHP8.
The transactions called from the api usually take over 2 minutes to finish.
Thanks for any help.

Server side api calls in PHP are done with cURL ( PHP: cURL Functions - Manual). The source code can be found in the file dmxConnectLib/modules/api.php.

The 504 error is a gateway timeout, can be something like a proxy server that is in-between that is causing the timeout.

Thanks Patrick. it is a valuable information. I am just trying to figure out who in the stack is causing the timeout.
Regards