Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to increase maximum execution time? #31

Closed
anantagati opened this issue Sep 3, 2010 · 7 comments
Closed

How to increase maximum execution time? #31

anantagati opened this issue Sep 3, 2010 · 7 comments

Comments

@anantagati
Copy link

I am trying to increase maximum execution time, but it Nginx always shows:
504 Gateway Time-out

I tried to increase time in php.ini, also in index.php by setting set_time_limit(0);

I also changed send_time and in nginx.conf, but nothing helps and after 60 seconds of running script it always writes error 502.

How can I increase execution time to not get errors?

@omega8cc
Copy link
Owner

omega8cc commented Sep 3, 2010

You have something terribly wrong if you need to raise this limit. Anyway, you can change it in /opt/etc/php-fpm.conf.

@anantagati
Copy link
Author

It is not live site. I need it if I want to use Drupal to process large file. Or when I debug code with xdebug 60 seconds is not enough for me.

What settings I have to change in php-fpm.conf? There is nothing close to 60s now. I tried to change request_terminate_timeout which was 180s, but it didn't help.

@omega8cc
Copy link
Owner

omega8cc commented Sep 7, 2010

request_terminate_timeout is the only setting there causing php process killed, but there are also max_execution_time and max_input_time in the /opt/etc/php.ini, both set to 180. Another reason can be a mysql timeout. Check our value in /etc/mysql/my.cnf. By default there is connect_timeout set to 60s and wait_timeout to 300s.

@anantagati
Copy link
Author

Nothing helped until I added following values into /etc/nginx/nginx.conf:

fastcgi_send_timeout 1800;
fastcgi_read_timeout 1800;
fastcgi_connect_timeout 1800;

(It is not live site, such high execution time is needed mainly for xdebug sessions, where I study what is happening.)

@drupin
Copy link

drupin commented Feb 22, 2012

Just for reference for any googlers, I had to import a large db using backup_migrate on one of our sites and couldn't accomplish it because of 504 timeout errors.

the settings I had to change to accomplish this were the ones described on the above comment, only now they are on /etc/nginx/conf.d/aegir.conf

@omega8cc
Copy link
Owner

It is a better idea to import database on command line, because there is no Nginx involved then, and you could use either mysql directly or via drush, because php-cli has higher timeout limit - up to 15 minutes.

@tobapramudia
Copy link

that's good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants