0

I have a dedicated server where I host my website, this server uses Apache but it also use Nginx as "reverse proxy server" (don't know what actually means, this is my first time I work on a dedicated server).

At first I've got this problem a PHP Script that runs for more than 60 seconds caused a "504 Gateway Time-out" and I fixed this with this block in nginx.conf

proxy_connect_timeout       9999;
proxy_send_timeout          9999;
proxy_read_timeout          9999;
send_timeout                9999;

But this lead me to discover another important problem:

If I run a PHP script that takes time and meanwhile I want to open another Page in the same browser, this page will continue to load until the first PHP Script ends.

How can I fix this? Maybe is just a matter of a configuration in Nginx, but as I told you, this is my first time with a Server.

Thanks in advice

Frank B.
  • 305
  • 1
  • 2
  • 9
  • Have you configured PHP to allow longer executions, as well as the server itself? [See here.](http://stackoverflow.com/questions/16171132/how-to-increase-maximum-execution-time-in-php) – samiles Jan 20 '17 at 15:03
  • Yes, at first I set in php.ini the max_execution_time to 0 to ignore this timeout, but then I saw that this wasn't enough and then discovered that was a Nginx. – Frank B. Jan 20 '17 at 15:11
  • Have you set `fastcgi_read_timeout`? [See answer here.](http://stackoverflow.com/questions/16002268/prevent-nginx-504-gateway-timeout-using-php-set-time-limit) And are you restarting Nginx/PHP when you make these configuration changes? – samiles Jan 20 '17 at 15:15
  • But the problem is not the timeout... Now my script runs as I want but the problem is that I can't open multiple windows if a page is loading. – Frank B. Jan 20 '17 at 15:21
  • You can't open multiple windows if a page is loading...? Now you've lost me. Are you saying the server only allows one connection at once, even from different computers? In what way can you "not open" another window? Is there an error message? – samiles Jan 20 '17 at 15:42
  • No... The problem is within the same Browser: 1.I open a Tab in Chrome, and run the PHP Script, it works as it should; 2.I open a Tab in Safari, run the same PHP Script while 1. is still running, and it works as well; 3.I open another Tab in Chrome, while 1. is still running but my server Web page doesn't load even if I try to access to the index.php page, until 1. finishes. Hope this clarify :) – Frank B. Jan 20 '17 at 16:09

0 Answers0