PHP脚本超时 - Fastcgi

I have a PHP script that times out after 7 mins.

The page then displays - 500: Internal Server Error.

I have tried to increase nginx and fastcgi timeouts but the issue remains. Also nothing shows up on the error logs.

My current settings are as follows:

/etc/nginx/nginx.conf:

#keepalive_timeout  0;
keepalive_timeout  65;

proxy_send_timeout 600;
proxy_read_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;

/etc/httpd/conf.d/fcgid.conf:

FcgidIdleTimeout 1800
FcgidProcessLifeTime 300
FcgidMaxProcesses 20
FcgidMaxProcessesPerClass 8
FcgidMinProcessesPerClass 0
FcgidConnectTimeout 600
FcgidIOTimeout 2400
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10

Should any of these settings be increased further or is there some additional settings that I need to add?

Also could there be an additional configuration file somewhere that I need to adjust?