Skip to main content
Luxian's Notes

Main navigation

  • Home
User account menu
  • Log in

Breadcrumb

  1. Home

how to

By luxian, 7 December, 2016

How to increase timeout for nginx and php7.0-fpm in Ubuntu

PHP FPM timeout settings

To increase PHP timeout, you have to edit /etc/php/7.0/fpm/php.ini and change/add this:

max_execution_time = 300

For FPM you need to change /etc/php/7.0/fpm/pool.d/www.conf as well and change/add this:

php_admin_value[max_execution_time] = 300

There is also another option in the www.conf file names request_terminate_timeout, I didn't change that one because documentation says it should be used only the max_execution_time doesn't stop the script execution.

Next step, restart fpm:

service php7.0-fpm restart

nginx timeout settings

Edit your server configuration file, usually placed in /etc/nginx/sites-available/example.com, and in the cgi section add:

fastcgi_read_timeout 300;

And then restart nginx:

service nginx reload

In case you are using nginx as a proxy to something else, you can find instructions in this article: How to Fix 504 Gateway Timeout using Nginx.

Tags

  • nginx
  • php-fpm
  • ubuntu
  • how to
By luxian, 5 December, 2016

InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch)

Recently I had to investigate some Drupal website crashing. While debugging I noticed a lot of mysql crashes and MySQL log was full of errors like this:

InnoDB: Error: Column last_update in table "mysql"."innodb_table_stats" is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch)

After some searching I managed to fix it by running mysql_upgrade command:

mysql_upgrade -u root -p <mysql_root_pass>

I added -p because my root user has a password, you can try without it first.

Source.

Tags

  • mariadb
  • database
  • how to
how to

Pages

  • Contact
  • My tech
  • Wishlist
RSS feed
Powered by Drupal