Score:0

nginx proxy to apache in local enviroment avoid error 504

ng flag

Hi guys I have a setup where I use Nginx as entry point for my HTTP request on port 80 and then I make a proxy to port 8080 where Apache is running a virtual host with PHP7.4 + MySQL running on windows 11 via laragon stack.

I am programming and consuming an API on TCG and the recommendation is to dump that data into my database; The problem is that the dump is taking me approximately 2 minutes and at the end it results in an error: 504 Gateway Timeout.

I am almost sure that the problem is my configuration; since I am not an expert and I have done it by trial and error ...

If there is the possibility that you can help me with the configuration; They tell me to upload it here in an update, if not they also let me know to delete this publication. Any suggestion is appreciated. Thank you!

Score:1
br flag

It's worth checking the error logs for both Nginx and PHP-FPM to see if any specific errors are being logged that may help to identify the issue.

The issue may be with your Nginx configuration. You will need to post it here so we can tell more.

In general, you can try increasing the proxy_read_timeout and proxy_connect_timeout values in your Nginx configuration to allow more time for the proxy to complete the request.

You can also try increasing the request_terminate_timeout value in your PHP-FPM pool configuration, as this value determines how long PHP-FPM will wait for a request to complete before timing out.

vigo serrano avatar
ng flag
thank you, let me try it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.