Thank you, everyone who tried to think in the direction of my problem. I've solve it successfully.
- First problem (with 504 error) could be solved by nginx option fastcgi_read_timeout, for example, it could be
fastcgi_read_timeout 600;
for tell nginx that it should wait for 600 seconds. It should be placed to host's config file, or to /etc/nginx/fastcgi_params (in Debian) - 上面的解决方法:
sudo pico /etc/nginx/nginx.conf
and add
fastcgi_read_timeout 300;
- Second problem was caused by option in my xdebug.conf:
xdebug.remote_autostart=1;
, it should bexdebug.remote_autostart=0;
. I doesn't understand the real meaning of this option, but it does following: Any php script automatically trying to connect to debugger (netbeans in my case). So, in some case, netbeans loses a connection, and when I press "Start debugging", it doesn't know, that new connection should be opened, and waiting for xdebug client forever. Now, with the mentioned option, I can start and stop debugging any time when I need it. - Third problem had the same source, as the second one. All others scripts, running on my server have tried to connect to netbeans, but with lost connection it was senseless.
Anyway, I hope this would help someone, who want to solve similar problems. StackOverflow helped me by forcing me to definitely describe my problem, and in this process I've gained new ideas on what to try.