server error log – script timeout
-
I am unable to generate a xml feed for 2000 products as the errors below occur. It appears the script timeouts on our host. Any quick fix?
[Tue Apr 24 18:57:47.295974 2018] [:warn] [pid 57178] [client 121.200.9.152:43826] Timeout waiting for output from CGI script /home/thewoolr/public_html/wp-admin/admin.php, referer: https://…/wp-admin/admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=7&project_hash=e9330f12a223a31a197d6c98cd9d332a&channel_hash=d4cb75caae5a73ac6b01171816b33bfb
[Tue Apr 24 18:57:41.984977 2018] [:warn] [pid 54967] [client 121.200.9.152:43606] Timeout waiting for output from CGI script /home/thewoolr/public_html/wp-admin/admin-ajax.php, referer: https://…/wp-admin/admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=7&project_hash=e9330f12a223a31a197d6c98cd9d332a&channel_hash=d4cb75caae5a73ac6b01171816b33bfb
-
Thanks for considering our plugin and reaching out to us.
Most common reasons for these time-outs to appear are:
– you are running an older version of PHP (older than 7.0)
– you have loads of unique (custom, dynamic and product) attributes (as in hundreds)
– you have over 500 product categories.Each of those can cause a time-out especially when multiple of the above reasons are true.
Best,
JorisI added the debug file below.
I note we moved our website from a subdomain to the main domain and the plugin logs still refer to our subdomain which does not exist. The plugin stops processing at 703 products and gives a timeout error.
we are running php 7. I have not tested newer or older php versions.
we have less than 50 product categories and product attributes.
April 24, 2018, 11:16 am
Array
(
[PHP] => 7
[Wordpress] => 4.9.5
[WooCommerce] => 3.3.5
[WooCommerce Product Feed PRO] => 2.6.1
)
Array
(
[Single products] => 1404
[Variation products] => 1405
[Total products] => 2809
)
Array
(
[0] => Array
(
[channel_hash] => d4cb75caae5a73ac6b01171816b33bfb
[name] => Google Shopping
[fields] => google_shopping
[taxonomy] => google_shopping
[utm_source] => Google Shopping
[type] => Advertising
[projectname] => googleshop
[countries] => Australia
[product_variations] => on
[fileformat] => xml
[cron] => daily
[step] => 100
[project_hash] => e9330f12a223a31a197d6c98cd9d332a
[filename] => e9330f12a223a31a197d6c98cd9d332a
[external_file] => https://www….com.au/wp-content/uploads/woo-product-feed-pro/xml/e9330f12a223a31a197d6c98cd9d332a.xml
[query_log] => https://www.staging….com.au/wp-content/uploads/woo-product-feed-pro/logs/query.log
[query_output_log] => https://www.staging….com.au/wp-content/uploads/woo-product-feed-pro/logs/query_output.log
[attributes] => Array
(
[0] => Array
(
[rowCount] => 0
[attribute] => g:id
[prefix] =>
[mapfrom] => id
[suffix] =>
)[1] => Array
(
[rowCount] => 1
[attribute] => g:title
[prefix] =>
[mapfrom] => title
[suffix] =>
)[2] => Array
(
[rowCount] => 2
[attribute] => g:description
[prefix] =>
[mapfrom] => description
[suffix] =>
)[3] => Array
(
[rowCount] => 3
[attribute] => g:link
[prefix] =>
[mapfrom] => link
[suffix] =>
)[4] => Array
(
[rowCount] => 4
[attribute] => g:image_link
[prefix] =>
[mapfrom] => image
[suffix] =>
)[5] => Array
(
[rowCount] => 5
[attribute] => g:availability
[prefix] =>
[mapfrom] => availability
[suffix] =>
)[6] => Array
(
[rowCount] => 6
[attribute] => g:price
[prefix] => AUD
[mapfrom] => price
[suffix] =>
)[7] => Array
(
[rowCount] => 7
[attribute] => g:google_product_category
[prefix] =>
[mapfrom] => categories
[suffix] =>
)[8] => Array
(
[rowCount] => 8
[attribute] => g:brand
[prefix] =>
[mapfrom] => custom_attributes__woosea_brand
[suffix] =>
)[9] => Array
(
[rowCount] => 9
[attribute] => g:gtin
[prefix] =>
[mapfrom] => custom_attributes__woosea_gtin
[suffix] =>
)[10] => Array
(
[rowCount] => 10
[attribute] => g:mpn
[prefix] =>
[mapfrom] => custom_attributes__woosea_mpn
[suffix] =>
)[11] => Array
(
[rowCount] => 11
[attribute] => g:identifier_exists
[prefix] =>
[mapfrom] => no
[static_value] => true
[suffix] =>
)[12] => Array
(
[rowCount] => 12
[attribute] => g:condition
[prefix] =>
[mapfrom] => new
[static_value] => true
[suffix] =>
)[13] => Array
(
[rowCount] => 13
[attribute] => g:item_group_id
[prefix] =>
[mapfrom] => item_group_id
[suffix] =>
)[14] => Array
(
[rowCount] => 14
[attribute] => promotion_effective_dates
[prefix] =>
[mapfrom] => sale_price_effective_date
[suffix] =>
)[15] => Array
(
[rowCount] => 15
[attribute] => g:sale_price
[prefix] => AUD
[mapfrom] => sale_price
[static_value] => true
[suffix] =>
))
[mappings] => Array
(
[2490] => Array
(
[rowCount] => 2490
[categoryId] => 2490
[criteria] => Women
[map_to_category] => 166 – Apparel & Accessories
)[2500] => Array
(
[rowCount] => 2500
[categoryId] => 2500
[criteria] => Knitwear
[map_to_category] => 166 – Apparel & Accessories
)[2492] => Array
(
[rowCount] => 2492
[categoryId] => 2492
[criteria] => Merino Clothing
[map_to_category] => 166 – Apparel & Accessories
)[2494] => Array
(
[rowCount] => 2494
[categoryId] => 2494
[criteria] => Possum Merino Clothing
[map_to_category] => 166 – Apparel & Accessories
)[2551] => Array
(
[rowCount] => 2551
[categoryId] => 2551
[criteria] => Sheepskin Jackets & Vests
[map_to_category] => 166 – Apparel & Accessories
)[2497] => Array
(
[rowCount] => 2497
[categoryId] => 2497
[criteria] => Sheepskin Boots & Shoes
[map_to_category] => 166 – Apparel & Accessories
)[2496] => Array
(
[rowCount] => 2496
[categoryId] => 2496
[criteria] => Socks
[map_to_category] => 166 – Apparel & Accessories
)[2521] => Array
(
[rowCount] => 2521
[categoryId] => 2521
[criteria] => Scarves & Wraps
[map_to_category] => 166 – Apparel & Accessories
)[2495] => Array
(
[rowCount] => 2495
[categoryId] => 2495
[criteria] => Beanies & Gloves
[map_to_category] => 166 – Apparel & Accessories
)[2522] => Array
(
[rowCount] => 2522
[categoryId] => 2522
[criteria] => Beanies & Hats
[map_to_category] => 166 – Apparel & Accessories
)[2527] => Array
(
[rowCount] => 2527
[categoryId] => 2527
[criteria] => Gloves & Mittens
[map_to_category] => 166 – Apparel & Accessories
)[2510] => Array
(
[rowCount] => 2510
[categoryId] => 2510
[criteria] => Bags, Handbags & Clutches
[map_to_category] => 166 – Apparel & Accessories
)[2491] => Array
(
[rowCount] => 2491
[categoryId] => 2491
[criteria] => Womens Spring Summer
[map_to_category] => 166 – Apparel & Accessories
)[2504] => Array
(
[rowCount] => 2504
[categoryId] => 2504
[criteria] => Baby
[map_to_category] => 182 – Apparel & Accessories
)[2525] => Array
(
[rowCount] => 2525
[categoryId] => 2525
[criteria] => Sheepskin Rugs & Toys
[map_to_category] => 182 – Apparel & Accessories
)[2515] => Array
(
[rowCount] => 2515
[categoryId] => 2515
[criteria] => Baby Knitwear
[map_to_category] => 182 – Apparel & Accessories > Clothing > Baby & Toddler Clothing
)[2505] => Array
(
[rowCount] => 2505
[categoryId] => 2505
[criteria] => Sheepskin Boots & Socks
[map_to_category] => 182 – Apparel & Accessories > Clothing > Baby & Toddler Clothing
)[2514] => Array
(
[rowCount] => 2514
[categoryId] => 2514
[criteria] => Baby Beanies & Gloves
[map_to_category] => 182 – Apparel & Accessories > Clothing > Baby & Toddler Clothing
)[2506] => Array
(
[rowCount] => 2506
[categoryId] => 2506
[criteria] => Blankets, Shawls & Wraps
[map_to_category] => 182 – Apparel & Accessories > Clothing > Baby & Toddler Clothing
)[2498] => Array
(
[rowCount] => 2498
[categoryId] => 2498
[criteria] => Mens
[map_to_category] => 166 – Apparel & Accessories
)[2499] => Array
(
[rowCount] => 2499
[categoryId] => 2499
[criteria] => Mens Knitwear
[map_to_category] => 166 – Apparel & Accessories
)[2507] => Array
(
[rowCount] => 2507
[categoryId] => 2507
[criteria] => Mens Merino Clothing
[map_to_category] => 166 – Apparel & Accessories
)[2508] => Array
(
[rowCount] => 2508
[categoryId] => 2508
[criteria] => Sheepskin Boots & Jackets
[map_to_category] => 166 – Apparel & Accessories
)[2513] => Array
(
[rowCount] => 2513
[categoryId] => 2513
[criteria] => Mens Socks
[map_to_category] => 166 – Apparel & Accessories
)[2516] => Array
(
[rowCount] => 2516
[categoryId] => 2516
[criteria] => Beanies, Gloves & Scarves
[map_to_category] => 166 – Apparel & Accessories
)[2488] => Array
(
[rowCount] => 2488
[categoryId] => 2488
[criteria] => Knitting & Crochet
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2489] => Array
(
[rowCount] => 2489
[categoryId] => 2489
[criteria] => Yarn
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2524] => Array
(
[rowCount] => 2524
[categoryId] => 2524
[criteria] => 2 Ply | Lace
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2518] => Array
(
[rowCount] => 2518
[categoryId] => 2518
[criteria] => 4 Ply | Fingering
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2517] => Array
(
[rowCount] => 2517
[categoryId] => 2517
[criteria] => 8 Ply | DK
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2519] => Array
(
[rowCount] => 2519
[categoryId] => 2519
[criteria] => 10 Ply | Worsted / Aran
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2552] => Array
(
[rowCount] => 2552
[categoryId] => 2552
[criteria] => 12 ply | Bulky / Chunky
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2548] => Array
(
[rowCount] => 2548
[categoryId] => 2548
[criteria] => 14 Ply | Super Bulky
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2520] => Array
(
[rowCount] => 2520
[categoryId] => 2520
[criteria] => Bulky / Chunky
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2530] => Array
(
[rowCount] => 2530
[categoryId] => 2530
[criteria] => Cotton
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2502] => Array
(
[rowCount] => 2502
[categoryId] => 2502
[criteria] => Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2537] => Array
(
[rowCount] => 2537
[categoryId] => 2537
[criteria] => 2 Ply | Lace Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2536] => Array
(
[rowCount] => 2536
[categoryId] => 2536
[criteria] => 4 Ply | Fingering Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2555] => Array
(
[rowCount] => 2555
[categoryId] => 2555
[criteria] => 5 Ply | Sport Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2534] => Array
(
[rowCount] => 2534
[categoryId] => 2534
[criteria] => 8 Ply | DK Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2535] => Array
(
[rowCount] => 2535
[categoryId] => 2535
[criteria] => 10 Ply | Worsted / Aran Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2553] => Array
(
[rowCount] => 2553
[categoryId] => 2553
[criteria] => 12 ply | Bulky / Chunky Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2547] => Array
(
[rowCount] => 2547
[categoryId] => 2547
[criteria] => 14 Ply | Super Bulky Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2532] => Array
(
[rowCount] => 2532
[categoryId] => 2532
[criteria] => Baby & Kids Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2538] => Array
(
[rowCount] => 2538
[categoryId] => 2538
[criteria] => Womens Knitting Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2539] => Array
(
[rowCount] => 2539
[categoryId] => 2539
[criteria] => Mens Knitting Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2533] => Array
(
[rowCount] => 2533
[categoryId] => 2533
[criteria] => Homewares Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2540] => Array
(
[rowCount] => 2540
[categoryId] => 2540
[criteria] => Crochet Patterns
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2501] => Array
(
[rowCount] => 2501
[categoryId] => 2501
[criteria] => Needles & Hooks
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2545] => Array
(
[rowCount] => 2545
[categoryId] => 2545
[criteria] => Crochet Hooks
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2546] => Array
(
[rowCount] => 2546
[categoryId] => 2546
[criteria] => Knitting Needles
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2503] => Array
(
[rowCount] => 2503
[categoryId] => 2503
[criteria] => Accessories & Buttons
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2531] => Array
(
[rowCount] => 2531
[categoryId] => 2531
[criteria] => Knit & Crochet Kits
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2528] => Array
(
[rowCount] => 2528
[categoryId] => 2528
[criteria] => Spinning, Weaving & Felting
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2529] => Array
(
[rowCount] => 2529
[categoryId] => 2529
[criteria] => Wool Roving & Fibre
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2544] => Array
(
[rowCount] => 2544
[categoryId] => 2544
[criteria] => Felting Kits, Books & Supplies
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2543] => Array
(
[rowCount] => 2543
[categoryId] => 2543
[criteria] => Drum & Hand Carders
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2549] => Array
(
[rowCount] => 2549
[categoryId] => 2549
[criteria] => Dyeing
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2541] => Array
(
[rowCount] => 2541
[categoryId] => 2541
[criteria] => Spinning Wheels & Supplies
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2542] => Array
(
[rowCount] => 2542
[categoryId] => 2542
[criteria] => Weaving Looms & Supplies
[map_to_category] => 16 – Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts
)[2509] => Array
(
[rowCount] => 2509
[categoryId] => 2509
[criteria] => Decor, Sheepskin & Gifts
[map_to_category] => 696 – Home & Garden > Decor
)[2523] => Array
(
[rowCount] => 2523
[categoryId] => 2523
[criteria] => Sheepskin & Cowhide Decor
[map_to_category] => 696 – Home & Garden > Decor
)[2511] => Array
(
[rowCount] => 2511
[categoryId] => 2511
[criteria] => Cushions & Homewares
[map_to_category] => 696 – Home & Garden > Decor
)[2550] => Array
(
[rowCount] => 2550
[categoryId] => 2550
[criteria] => Blankets & Throws
[map_to_category] => 696 – Home & Garden > Decor
)[2526] => Array
(
[rowCount] => 2526
[categoryId] => 2526
[criteria] => Felt & Fibre Art
[map_to_category] => 696 – Home & Garden > Decor
)[2554] => Array
(
[rowCount] => 2554
[categoryId] => 2554
[criteria] => Cards & Gifts
[map_to_category] => 696 – Home & Garden > Decor
)[2512] => Array
(
[rowCount] => 2512
[categoryId] => 2512
[criteria] => Home
[map_to_category] => 696 – Home & Garden > Decor
)[4195] => Array
(
[rowCount] => 4195
[categoryId] => 4195
[criteria] => Uncategorized
[map_to_category] => 696 – Home & Garden > Decor
))
[page] => filters
[utm_medium] => cpc
[utm_campaign] => googleshop
[utm_term] => id
[utm_content] =>
[active] => true
[last_updated] => 24 Apr 2018 11:05
[running] => processing
[nr_products] => 2809
[nr_products_processed] => 703
[history_products] => Array
(
[18 Apr 2018 10:05] => 0
[18 Apr 2018 10:11] => 594
[19 Apr 2018 07:12] => 592
[20 Apr 2018 07:12] => 882
)[project_update] => yes
))
Array
(
)This kind of behaviour usually is caused by these reasons:
– your WP Cron is disabled or restricted. The plugin needs the WP Cron to be active as it processes products in batches so it doesn’t run into memory or time-out-issues;– firewall preventing the script from running too long (for example Wordfence and Siteground)
Could it be one of the above issues for you?
All the best,
Joriswp cron is enabled in settings.php
my host is sitegrounds on go geek plan – i assume this is the issue
Probably yes, SiteGround can increase the execution time of a script. Just increase it and you should be fine.
All the best,
JorisHi! It seems I am facing a similar issue. It comes down to getting an empty feed. As I went through all (I think) advice above, my best guess is too short execution time.The default set by my provider is 30sec.
Can you provide some detailed documentation on how to adjust the php.ini for your plugin’s needs?
Thanks!
MarkusHi Markus,
Thanks for using our plugin and reaching out to us.
You can follow these steps to change the execution time:
https://www.a2hosting.com/kb/developer-corner/php/using-php-directives-in-custom-htaccess-files/setting-the-php-maximum-execution-time-in-an-htaccess-fileAnother possible cause for this is the WP CRON not being active or being restricted. Do you know if your WP CRON is enabled?
All the best,
JorisSitegrounds shared hosting plans only permit 30sec execution time before returning a php timeout error. Unfortunately, Sitegrounds will not increase execution time on our go geek plan.
An option could be added to limit execution time to avoid timeout errors with Sitegrounds (and other low resource hosts)?
@rainsey yes that could be an option to solve the issue at hand. However, we have quite some users who are running on Siteground and they do not experience similar issues.
Would you be so kind as to reach out on [email protected] so we can discuss options?
Have a wonderful weekend,
JorisHi Jori, thank you very much for taking care!
“define(‘DISABLE_WP_CRON’, false);” was already added to my wp-config. According to my provider there are no restrictions to it. Therefor cron should be finde, but I can’t proof it. Can I?
Now I set max_execution_time from 30 to 140. That’s my provider’s max.
Good news: The feed contains some data ??
Unfortunately there is a new issue. I get the complete list (all lines), but not all collumns.
These attributes are missing (they are missing completely, even in the header; it’s not just an empty value in the cells):
g:gender (dynamic value)
g:color (dynamic value)Also, collumn “brand” shows “Yes” instead of the dynamic value.
What can I do?
Additional information:
When I was setting up the field mapping, I used the regular “Add field mapping” option. I had to do it over and over again as the system didn’t save all the fields.
It takes several minutes until the feed is refreshed. The “procesing”-status is not automatically updating.
debug file (shortened):
April 28, 2018, 11:52 am
Array
(
[PHP] => 5.6
[Wordpress] => 4.9.5
[WooCommerce] => 3.3.5
[WooCommerce Product Feed PRO] => 2.6.7
)
Array
(
[Single products] => 525
[Variation products] => 649
[Total products] => 1174
)It seems you are running on an older version of PHP (5.6). Are you able to upgrade to at least PHP 7.0? It would not only make the processing of the feed a lot smaller but your entire site would be faster.
Yes, the status ‘processing’ is not yet auto-refreshing itself (is on our to-do-list), you need to refresh the browser to see the status message change.
I assume you created a feed for Google Shopping? Did you set it file format XML? I strongly advice doing so as it is less error prone and easier to read.
Let’s take it from there and than look at the missing attributes.
All the best,
JorisHiya, you are the best.
PHP7.2 and XML: All attributes, fast & smooth. Solved ??
Thank you Joris, have a great day.
Happy to have helped out!
Have a great weekend,
Joris
- The topic ‘server error log – script timeout’ is closed to new replies.