Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM Marketplace – REST API › **URGENT/SITE CRASHING** Need help with AJAX calls/FrontEndManager
Tagged: ajax, notifications, slow site
- This topic has 14 replies, 5 voices, and was last updated 4 years, 7 months ago by ciccupio97.
- AuthorPosts
- April 17, 2020 at 1:37 am #119882mxlocker.comParticipant
Hello, currently we are using multivendor marketplace, WC frontend manager and it is causing a huge amount of AJAX calls causing the site to crash, eat up CPU, etc.
Please look at the video below, any help would be appreciated!
https://wpengine-ss.s3.amazonaws.com/2020-04-16_10-33-08.mp4
Attachments:
You must be logged in to view attached files. - April 17, 2020 at 1:20 pm #119963gazArchitectParticipant
up vote
I am interested in this answer as I have seen runaway admin-ajax.php on our server requiring it to be bounced. Unfortunately, in production there is no time to keep debugging so we are limited only to the event logs related to the crash.
- April 17, 2020 at 8:57 pm #120107SushobhanKeymaster
Hi,
Thanks for getting in touch and sorry for any inconvenience caused.
By default the plugin checks for any new notifications every 1 min. Now, to solve the issue, either we can increase the time interval or disable auto update of notification feature. Let me know which option suits you and I’ll guide you accordingly.
Also, as I can see there are 2 more topics you have created regarding the same issue. I’m closing those, as we will continue the discussion here.
Thanks! - April 18, 2020 at 1:01 pm #120268SushobhanKeymaster
Hello,
Please update to our latest version, v3.3.8, there it is disabled by default.
Thanks! - April 19, 2020 at 1:07 pm #120561gazArchitectParticipant
I would like to see both paths to modifying admin-ajax if you could show. I can see use case for both solutions. Thank you.
/side question: I am not able to create a new issue here in boards. Is creating new part of premium?/
- April 21, 2020 at 1:31 pm #121280SushobhanKeymaster
Hello,
You can use the following filters to enable or disable this feature (v3.3.8 or above)-add_filter( 'wcfm_is_allow_desktop_notification', '__return_false' ); add_filter( 'wcfm_is_allow_new_message_check', '__return_false' );
To change the default time interval between requests, use the following filter-
apply_filters( 'wcfm_new_message_check_duration', 60000 )
You mentioned “I am not able to create a new issue here in boards.”, does this mean you can’t create new forum topics? Our forum is open for both our free and premium users. Please try using another browser or browser incognito mode.
Thanks! - April 22, 2020 at 10:57 am #121641gazArchitectParticipant
Excellent. Thank you for the reply. I will implement these.
Thank you also for reply to issue posting. Yes, I was not able to create a new topic under REST API forum. I was able to reply to existing topic feeds just not create new. I tried with Chrome per your advice and that worked. FYI Firefox 75.0 (64-bit) was the browser that failed on create new topic.
- April 22, 2020 at 1:31 pm #121678SushobhanKeymaster
You are always welcome 🙂
Let me know if there’s anything else we can help you with.
Can we ask for a favor? Would you mind taking a few minutes to review our plugin at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.
- April 23, 2020 at 1:37 pm #122114gazArchitectParticipant
I left 5 stars ;o) Will follow on twitter too. TY
- April 23, 2020 at 2:57 pm #122148SushobhanKeymaster
Thank You 🙂
- May 12, 2020 at 4:58 pm #130018Oksana GrishchenkoParticipant
Hello
How can disable checks for any new notifications every 1 min for vendors but at the same time it works for admin?
Thank you
- May 12, 2020 at 5:28 pm #130025SushobhanKeymaster
Hi,
You can use the following code to do that-function allow_only_for_admin( $status ) { if ( current_user_can( 'administrator' ) ) return true; return false; } add_filter( 'wcfm_is_allow_desktop_notification', 'allow_only_for_admin' ); add_filter( 'wcfm_is_allow_new_message_check', 'allow_only_for_admin' );
Add this code to your child theme’s functions.php
In case you do not have a child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Let me know how this goes.
Thanks! - May 24, 2020 at 10:16 pm #134814ciccupio97Participant
How can i allow system to check for new notification to all vendors every 10 minutes?
- May 24, 2020 at 10:47 pm #134818SushobhanKeymaster
Hi,
Kindly use the following filter for that purpose-add_filter( 'wcfm_is_allow_desktop_notification', '__return_true' ); add_filter( 'wcfm_is_allow_new_message_check', '__return_true' ); apply_filters( 'wcfm_new_message_check_duration', 600000 );
Add this code to your child theme’s functions.php
In case you do not have a child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Let me know how this goes.
Thanks! - May 25, 2020 at 2:54 am #134867ciccupio97Participant
thank’s work fine
- AuthorPosts
- You must be logged in to reply to this topic.