Where is php.ini for nginx + php5.6-fpm


#1

Hi Everyone,

I seem to have problems saving a crowded menu in wordpress. Seems I have to increase post max vars in php.ini, I have edited /etc/php5.6/fpm/php.ini but that did not work. Any ideas would be very welcome, thanks a lot!


#2

You need to add (if it doesn’t exist) or increase max_input_vars PHP var in php.ini to something like 5000 or 6000.

max_input_vars = 6000


#3

Hey tyrro,

Thanks for the feedback, already done that. But I might have updated the wrong php.ini maybe? Nothing else comes to my mind…


#4

Have you restarted php5.6-fpm? sudo service php5.6-fpm restart


#5

Hi tyrro,

I have managed to solve this problem by the following;

in /etc/nginx/nginx.conf (modification from 300 to 600): fastcgi_read_timeout 600

in /etc/php/5.6/fpm/pool.d/www.conf (adding the following): request_terminate_timeout = 600

This pretty much solved it on top of max_input_vars definition in php.ini.

However, I have a question for you, and be glad if you find the time to answer it. When I click on “update menu” in admin panel now, it takes around 3-4 minutes to save the menu. In this time, the server is unable to process other page requests.

For example, if I hit “update menu” button, and open a new browser window and point it to site homepage, then it will wait for the menu to be saved, and then load up the homepage. Do you know if there’s any way to run these processes in parallel?

I have looked up for this problem and found out that nginx has rolled out an “aio directive”, which seems to do something like running another process instead of a waiting process, and I applied the directive in common conf files. Although it brought in a remarkable performance boost, it did not remedy that situation.

Any ideas on this would be much welcome. Thanks,

Alp


#6