1

I've been make a wordpress site with woocommerce and works perfectly but when you enter in the wordpress panel in woocommerce > Desktop, for see your sells, Leaderboards, etc, it takes a long time to load and the website down with a 503 error, i can't access to the website for 3 minutes. This can happen in the entire woocommerce plugin but in this section is where this problem happens the most. The server use all the 512 Mb and all the I / O that is 1 Mb.

In the Cpanel> Metrics> CPU and Concurrent Connection Usage> Snapshot, the table shows two CMD / usr / sbin / httpd -k start with 225 MB of ram each.

I've been reinstall the woocomerce plugin, i increased the php memory and wordpress memory but doesn't work. Anyone had this problem?

Thank for your support.

EDIT 1

My debug log in wp-content is:

[12-Jun-2020 22:49:54 UTC] PHP Notice:  Undefined index: items in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1251
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1226
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1240
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1258
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1298
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1314
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1319
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1324
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1329
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1356
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Undefined index: items in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1251
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1226
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1240
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1258
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1298
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1314
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)m/wp-includes/rest-api.php on line 1319
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1324
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1329
[12-Jun-2020 22:49:54 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/vmgcwv3crvl0/public_html/(mydomain)/wp-includes/rest-api.php on line 1356

EDIT 2

PHP version: 7.4.5

Woocommerce versión: 4.2.0

Wordpress version: 5.4.2

rest-api code: https://www.dropbox.com/s/zoqwjhuuwny1oi8/rest-api.php?dl=0

I see this solution and now i don't have errors in debug_log but when enter to see the woocommerce statics my website goes out but now with 524 error.

In the google console i have this errors when i woocommerce load the statics: Error image

1 Answers1

1

try to change the theme make it default theme and see is that work & add define( ‘WP_DEBUG’, true ); and define( ‘WP_DEBUG_LOG’, true ); to “wp-config.php” file. This will create a “debug.log” file in wp-content folder. i hope that can help you

belhadj abdou
  • 178
  • 4
  • 16
  • 1
    ok just try to disable api rest woocomerce -> setting->advanced -> api rest disable it and see if that work – belhadj abdou Jun 13 '20 at 00:57
  • The api rest from the beginning was not activated but I tried to activate it and I continue with the same problem in both cases (if it is activated or deactivated). – Ruben Valdivia Perez Jun 13 '20 at 02:40
  • 1
    Undefined index: items means the variable i think if you add this !isset() it will be ok – belhadj abdou Jun 13 '20 at 13:00
  • My php version is 7.4.5 and the code for the rest-api is (before apply !isset()) [here](https://www.dropbox.com/s/zoqwjhuuwny1oi8/rest-api.php?dl=1). I apply the !isset() but doesn't work.I see the same problem on github [here](https://github.com/woocommerce/woocommerce-admin/pull/4377) and i have to add `'items' => array('type' => 'string',),` in woocommerce plugin and i don't have the errors anymore in the debug_log but i have the same issue when i see the statics in the wordpres panel my website goes down but now with 524 error. – Ruben Valdivia Perez Jun 13 '20 at 18:07
  • I update the post with an image the google console when woocommerce load the statics. – Ruben Valdivia Perez Jun 13 '20 at 18:25
  • 3
    hello hello that clear now you probelm wc analytique go in plugin folder and creat a new plugin inside creat disable-woocommerce-admin.php add_filter( 'woocommerce_admin_disabled', '__return_true' ); – belhadj abdou Jun 13 '20 at 18:56
  • 3
    and activate the plugin now – belhadj abdou Jun 13 '20 at 18:58
  • So the woocommerce admin is the problem. I've disable the plugin and works, but now i haven't the benefits of this plugin, i suppose that in a next update they will solve this problem.I will open a new problem in the woocommerce admin github repository. Thank you for your support. – Ruben Valdivia Perez Jun 13 '20 at 19:35
  • 1
    happy for you but i think the problem in your theme – belhadj abdou Jun 13 '20 at 19:46
  • What you mean? I use Astra for the woocommerce, how to configure Astra theme? or what is the problem whith this theme? – Ruben Valdivia Perez Jun 13 '20 at 19:53
  • 2
    try to make last version of the theme – belhadj abdou Jun 13 '20 at 19:59
  • i have the last version of the astra theme. – Ruben Valdivia Perez Jun 13 '20 at 20:15
  • Somebody open a issue with the same problems that i have. [Link of the issue](https://github.com/woocommerce/woocommerce-admin/issues/3943). – Ruben Valdivia Perez Jun 13 '20 at 21:04
  • 2
    WC Admin makes too many ‘GET requests’ this is your issue do you have many orders ? – belhadj abdou Jun 13 '20 at 21:20
  • 2
    chedck this code to limite thos request https://github.com/woocommerce/woocommerce-admin/blob/master/client/wc-api/constants.js#L13 – belhadj abdou Jun 13 '20 at 21:27
  • The online store is still under development so I don't have any order. – Ruben Valdivia Perez Jun 14 '20 at 18:36
  • ok take back up of product and page and do another wordpress it's better – belhadj abdou Jun 16 '20 at 13:46
  • I recently i moved the woocommerce site to Siteground and works perfectly, i don't have the problem anymore, woocommerce admin works in siteground. i reinstall woocomerce in godaddy but I still had the same problem so when moved to siteground, the problems were solved. – Ruben Valdivia Perez Jun 17 '20 at 22:56
  • yeap but next time try to chose a hosting isolated read carefully there proposition – belhadj abdou Jun 18 '20 at 10:28