Why TCs wp-async-task run as a sync task in production environment?

I wrote a plugin that executes a quite synchronization between WooCommerce and a remote database, so I wrapped the action as an asynchronous task using TechCrunch’s wp-async-task class. Everything works fine and the task is successfully run in background, but the same exact code on the production environment runs the action in the page the user requested it from, resulting in an “infinite page load” situation (not infinite, but we talk about minutes, and often everything ends with a 504 gateway timeout).

Both environments are nginx 1.12.1 + php-fpm 7.0 ( 7.0.27 on prod, 7.0.23 on local, but the differences between the releases are only bugfixes), the core modules are the same and the pool configuration is nearly identical (saving some environmental parameters).

The issue is quite annoying, does anyone have any clue or previous experience about this?

Thanks

Read more here:: Why TCs wp-async-task run as a sync task in production environment?

Leave a Reply

Your email address will not be published. Required fields are marked *