Closed szuranski closed 3 years ago
Thanks for reporting. We will be looking at improving the performance in the upcoming releases. Transferring the issue to WC Admin repo.
Thanks for reporting. We will be looking at improving the performance in the upcoming releases. Transferring the issue to WC Admin repo.
Can you give any idea how long? 1 week, 1 month?
@szuranski thanks for the report. Can you share a few more details about your site to see if we can reproduce? Where is the site hosted specifically? Based upon the status report above, it says "example.com" is this happening in a local environment only?
We have tested the dashboard, and all of WooCommerce 4.0 on a variety of hosting environments and did not encounter this, but I am aware it has happened on other sites. Also have you tried disabling other plugins/extensions to determine if another one is possibly hooking into the REST API and causing slower response times?
@timmyc
https://www.hi-vis-shirts.com/
It's a fresh install of WP and Woo on a GoDaddy server. All plugins except Woo where disabled with the same result. It's directly related to the amount of AJAX calls made after page load. There more calls the more likely the page times out.
@szuranski thanks so much! We have tested on GoDaddy, but I will test again and see if I can reproduce. It almost sounds like there might be some sort of firewall/web security thing triggering to block the requests to the REST API.
I'm not extremely familiar with GoDaddy, but what is the name/level of the hosting plan that is in use? We do have some contacts at GoDaddy I can reach out to also and get some help debugging from their side.
@timmyc
GoDaddy Deluxe Hosting
I did a quick trace on wp-json/wc-analytics/admin/notes
Spec:
Plugins: +------------------------------------+----------+-----------+---------+ | name | status | update | version | +------------------------------------+----------+-----------+---------+ | query-monitor | inactive | none | 3.5.2 | | sendgrid-email-delivery-simplified | active | none | 1.11.8 | | woocommerce | active | none | 4.0.1 | +------------------------------------+----------+-----------+---------+
Completely fresh install with no products or orders.
Summary
Trace for wp-json/wc-analytics/admin/notes
file_exists via spl_autoload_call would explain high IO seen in the first comment (this happens for every request to wc-analytics). register_rest_route seems erroneous and should not be called so many times.
@timmyc Ping me if you need reproducible env.
@szuranski I set up a new site on GoDaddy hosting and can not re-create myself there. By chance are you running Sucuri firewall or a similar service.
@dz0ny absolutely, please do reach out with a site where this is happening that I can access 🙌
timmy.crawford -at- automattic.com
@timmyc
The Wordfence plugin is installed but even with it deactivated it still happens.
There's still dozens of AJAX requests on page load on the WooCommerce > Dashboard tab that all end with a 503. Are you seeing the same amount of requests on your setup?
@szuranski indeed I have those REST API xhr requests happening too, just none are failing for me.
Did you by chance configure the site/DNS to use the Sucuri firewall service still? I'm not really savvy with their offering, and am in the process of setting it up myself to see if that could be throttling the requests.
I am having the same issue with the 503 Errors. The log shows some errores related to the database:
Error while sending QUERY packet. PID=1024988 in /home/fardatxo/public_html/wp-includes/wp-db.php on line 2030
mysqli_real_connect(): (HY000/1203): User fardatxo_woo already has more than 'max_user_connections' active connections in /home/fardatxo/public_html/wp-includes/wp-db.php on line 1633
There's also some intense resource usage whenever I try to access the WC Dashboard.
It's very unlikely that this is due to traffic since the site has low traffic. Not using sucuri. I can provide access to a staging site if needed.
@timmyc
Sucuri or any other firewall is not set up on the site.
I am having this exact issue. I have an open support case with woo commerce about this. Did you get anywhere with it?
@5PENC3 I have not found a solution yet.
@5PENC3 I have not found a solution yet.
Thanks - Woocommerce have referenced this thread in my ticket. I have clients eagerly waiting to launch the website so I need a solution as soon as possible or I could potentially lose them. They have also expressed interest in moving to Shopify :(
@szuranski @5PENC3 The next release reduces the number of REST API calls on page load and has some performance improvements in some of the API processing. Hopefully that will reduce the load below your max_user_connections
setting.
Not sure if the update has been released yet, but have experienced this today with WooCommerce version 4.0.1. On Nimbus hosting, running via Plesk, PHP 7.3 with 768M memory limit. Several AJAX requests, most don't complete and 503 causing the dashboard to stall and show no statistics.
ERROR 500 GET /wp-json/wc-analytics/reports/downloads/stats?after=2019-04-01T00%3A00%3A00&before=2019-04-19T23%3A59%3A59&interval=day&order=asc&per_page=100&_locale=user HTTP/1.0
ERROR 503 GET /wp-json/wc-analytics/reports/performance-indicators?after=2020-04-01T00%3A00%3A00&before=2020-04-19T19%3A05%3A00&stats=revenue%2Ftotal_sales%2Crevenue%2Fnet_revenue%2Corders%2Forders_count%2Corders%2Favg_order_value%2Cproducts%2Fitems_sold%2Crevenue%2Frefunds%2Crevenue%2Fgross_sales&_locale=user HTTP/1.0
We do have WordFence enabled - will setup a staging site and test with it disabled.
Are the API requests cached, as doesn't seem to get much better on next load(s)?
To my knowledge there isn't an update yet but I wouldn't know as I have been forced to downgrade to 3.9 which has not solved the problem but it has made it less frequent. I have had to rebuild the website from scratch and will be aiming to swap the website over tomorrow morning. This has been the only solution I can provide for the client and had been a tonne of extra work on my part. I pray the new website doesn't develop the fault too otherwise I really don't know what I'm going to tell them.
@5PENC3 it's essentially a resource issue - so if you're in a pickle in the meantime - would suggest that you upgrade or change your hosting plan. Personally I rate SiteGround - enable their dynamic caching, memcache and NGINX file serving options which come on their 'GoGeek' package - or look into a VPS if the site gets a high number of visitors.
If you don't already have a static caching system on the site, install one - that will alleviate the load on the server from frontend visits ( something like WP Rocket ). You could also look into serving your static files from a CDN, again to alleviate load on the server ( fairly simple to setup with WP Rocket ).
If you can't migrate hosting, increase your PHP memory limit and use the latest version of PHP available on the hosting package.
@5PENC3 it's essentially a resource issue - so if you're in a pickle in the meantime - would suggest that you upgrade or change your hosting plan. Personally I rate SiteGround - enable their dynamic caching, memcache and NGINX file serving options which come on their 'GoGeek' package - or look into a VPS if the site gets a high number of visitors.
If you don't already have a static caching system on the site, install one - that will alleviate the load on the server from frontend visits ( something like WP Rocket ). You could also look into serving your static files from a CDN, again to alleviate load on the server ( fairly simple to setup with WP Rocket ).
If you can't migrate hosting, increase your PHP memory limit and use the latest version of PHP available on the hosting package.
Thanks for the reply I appreciate it. Here's how it went today;
I moved over to the rebuilt website and still had the same issue. I'd already increased all of the memory limits available to me so I contacted my host again and upgraded my hosting account. This did still not fix the issue. At this point I've tried everything I can think of except a new host. I set up an account with Siteground after a couple of recommendations online and boom, working flawlessly. I'm not sure what the issue was and if my hosts are to blame or not but this was one of the things they said:
As for the website it time out as there are processes that took too long to respond, for example:
[21-Apr-2020 09:06:15 UTC] PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /public_html/wp-includes/sodium_compat/src/Compat.php on line 1108
(not sure why that's so big couldn't clear the formatting)
Moving the site away from a host that I've used for years wasn't the ideal solution for me but myself and my client are both relieved. I just hope I don't run into this issue again.
@5PENC3 Glad you were able to get it sorted out. This info is really helpful
[21-Apr-2020 09:06:15 UTC] PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes)
I installed a plugin that disables the WC analytics features. This solved the 503 issues!
Does anyone use the realtime backup plugin on their environment? I've resolved my issues by disabling the backup plugin. No more 503s after the backup plugin was disabled.
@igorradovanov interesting - could you share a link to that plugin - I'm having issues finding it.
Sure thing, @timmyc It was the BackupBuddy in my case.
@lammersma did you install Disable WooCommerce Bloat?
Yes, I believe I did. But I removed it as soon as it turned out not solve any issues… Is there a left over causes new issues? ☹
Van: Patrick Mackaaij notifications@github.com Verzonden: zondag 3 januari 2021 14:01 Aan: woocommerce/woocommerce-admin woocommerce-admin@noreply.github.com CC: lammersma lammersma@hotmail.com; Mention mention@noreply.github.com Onderwerp: Re: [woocommerce/woocommerce-admin] 503 Errors in Admin (#3943)
@lammersmahttps://github.com/lammersma did you install Disable WooCommerce Bloathttps://wordpress.org/plugins/disable-dashboard-for-woocommerce/?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/woocommerce/woocommerce-admin/issues/3943#issuecomment-753613549, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGJPR6GD44KPMW2GWGJ5CL3SYBTAJANCNFSM4LPLZ55Q.
I stumbled upon this topic as I received a few warnings from my hosting provider regarding RAM exhaustion. Almost all of the errors trace back to calls related to WooCommerce.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue was automatically closed due to being stale. Please feel free to re-open it if you still experience this problem.
I have the same problem... Anyone knows how to fix this? Tried almost everything, from clean installation on new host to disabling/enabling every plugin and theme at once.
When accessing the backend in version 4.0 multiple AJAX call are being made which caused the server to start returning 503 errors. The more AJAX requests being made the more likely the page doesn't load.
Many others reporting the same problem. https://wordpress.org/support/plugin/woocommerce/
To Reproduce Steps to reproduce the behavior:
Screenshots
Expected behavior All WooCommerce admin pages should load without crashing the server.
Isolating the problem (mark completed items with an [x]):
WordPress Environment