Scheduled import times out yet manual runs fine

Pending

Import WP Addon - WooCommerce Updated 3 days ago 5 Replies

Ian asked 3 days ago on May 14, 2025 at 8:42 am

Hi, I’ve scheduled an import of a 997kb CSV containing price & stock status data for 14039 products, which runs at 2am.

Both times it has run, it times out at 2:26am, having imported just over 20% of the products (3401 first time, 2914 the second).

When I run the same import manually during the day (when you’d expect server load to be higher), it completes fine.

I’ve had our host check the error logs and server resources, they tell me there’s nothing in the admin error log and no resources are hitting their limits.

post_max_size is 256M, PHP max execution time is 1 hour.

Can you help diagnose what’s causing the timeout please?

J

James replied Support Agent

3 days ago on May 14, 2025 at 8:45 am

Hi Ian,

Just to start with the basics and go from there, how often is your wordpress cron set to run and is this set to your systems task scheduler?

James

IL

Ian replied

3 days ago on May 14, 2025 at 10:24 am

Hi James, Cron is set to run every 30 mins at 26 and 56 mins past the hour (so coincides with the fail at 2:26).

This is the most recent entry for wp-cron.php running in the log:

May 14 10:56:01 optweb02 CROND[447662]: (doorsonl) CMD (cd /home/doorsonl/public_html && /usr/local/bin/ea-php83 /home/doorsonl/public_html/wp-cron.php)

 

J

James replied Support Agent

3 days ago on May 14, 2025 at 10:31 am

Thank you, i would recommend changing this to run every minute.

The resoning behiend this is due wordpress having many tasks to run via its cron system, combined with the scheduled importer also being ran via the cron system, means that it is not guaranteed to run once every 30 minutes (which greatly increases the time it takes to import), so increasing this interval means more tasks get done and more chance of the importer running and continuing the "timeout" import.

Can you also tell me what the ImportWP > Settings / Tools > Timeout setting is at?, this should be less than the cron interval.

So if your wp cron interval is set to every minute, this should be set to 30 seconds

J

James replied Support Agent

3 days ago on May 14, 2025 at 10:33 am

Just to note, if the cron runs every minute, and the importer timeout setting is set to 30 seconds, then in theory the importer should run every minute for 30 seconds until the import is complete.

IL

Ian replied

3 days ago on May 14, 2025 at 10:48 am

Thanks James, I'll get that changed and see if it fixes the situation. IWP timeout is set to 30s, so should be fine as it stands.