Forums / Code Collaboration / Encapsulated plugin installer timeout

Encapsulated plugin installer timeout

Views: 3,079

Results 1 to 3 of 3
2 Nov 2024, 12:44 PM
#1
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
414
Plugin Contributions:
6

Encapsulated plugin installer timeout

After updating Postcode Autofill to encapsulated plugin and due to big size databases this plugin installs, I get a timeout error when first installing it.

PHP Fatal error: Maximum execution time of 60 seconds exceeded in D:\wamp\www\zencartJP\includes\classes\db\mysql\query_factory.php on line 437

If I delete the last table which has been only partially installed and then run installer again, then the plugin installs normally, because more than half the tables are already installed, and it tries to install only the new ones.
It would be definitely better if it would install in one step.
It seems I can't do much on the plugin side. SQLs queries from the installer are actually cached in ZC and then executed with a limit of one minute for the whole thing.
Well, I am opened to any idea or suggestion.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

2 Nov 2024, 2:07 PM
#2
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: Encapsulated plugin installer timeout

Adjust the PHP execution time at your webhosting to sth. like 240.

roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/

2 Nov 2024, 4:50 PM
#3
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
414
Plugin Contributions:
6

Re: Encapsulated plugin installer timeout

Shop Suey:

Adjust the PHP execution time at your webhosting to sth. like 240.

Thanks for your answer.
Actually, my php.ini setting max_execution_time is already set to 240. But thanks to your answer I realized this can be set in PHP scripts by function set_time_limit() too and and found out there is a function zen_set_time_limit() in Zen Cart and although Zen Cart has a default setting of 60s that we can set in admin menu ```
Configuration->MyStore->Admin Set max_execution_time for processes

Increasing this setting to 120 did the trick.
I will add this in plugin installer and plugin documentation.

Thanks!

ZC v2.2.2 PHP 8.4+ MySQL 8.4+