Perfecty
Forum Replies Created
-
Forum: Plugins
In reply to: [Perfecty Push Notifications] Notification not sent after batch sizeHi @kaldata we will include some changes related to how we handle the batches so that it is more stable in different environments. As far as we know, it’s working fine in other environments that send more than 11.000 notifications. However if you still experience this, and if you find something suspicious that will help us to identify what’s happening please let us know ??
Forum: Plugins
In reply to: [Perfecty Push Notifications] Notification not sent after batch size@kaldata please enable the server logs in Perfecty > Settings > Enable Server Logs, and let us know what error you can see in Perfecty > Logs. The error you mention is a bit different to the one reported here, as you’ve at least executed a few batches. Looks like something else is causing this, I suspect your server runs out of memory in a batch size of 100.
All the options are documented here: https://docs.perfecty.org/wp/configuration/#6-self-hosted-server
- This reply was modified 3 years, 8 months ago by Perfecty.
Forum: Plugins
In reply to: [Perfecty Push Notifications] BuddyPress notificationsHello, right now we don’t have specific actions for BuddyPress, however before taking any action please check the latest changes we introduced. They allow you to integrate and call Perfecty Push plugin externally to do more advance features yourself: https://github.com/perfectyorg/perfecty-push-wp#external-integrations-
Forum: Plugins
In reply to: [Perfecty Push Notifications] Notification not sent after batch sizeClosing this due to inactivity
Forum: Plugins
In reply to: [Perfecty Push Notifications] Select icon from media libraryThis has been released in
v1.3.1
Forum: Plugins
In reply to: [Perfecty Push Notifications] OneSignalThe original request items have been included in
v1.3.1
. In regards to the performance improvements there’s a ticket for it already in Github, so please follow the one from Github: https://github.com/perfectyorg/perfecty-push-wp/issues/81Forum: Plugins
In reply to: [Perfecty Push Notifications] Select icon from media libraryThis is already done and will be included in the next release
v1.3.0
Forum: Plugins
In reply to: [Perfecty Push Notifications] Unable to get it workWe’ve checked and this is not a bug. We’re AMP friendly in the sense that our service worker is not in conflict with AMP plugins, however we don’t support AMP native Push Notifications yet. This means, in the official AMP plugin we’re compatible with the Transitional mode, not Standard mode (Full AMP).
However, native AMP Push Notifications is something we’re planning to implement, so we’re still keeping the ticket here as a feature we want to implement in the near future.
Forum: Plugins
In reply to: [Perfecty Push Notifications] OneSignalOK, that’s an interesting use case and we would love to assist you on getting those numbers ??
As far as we know the push library we use doesn’t do grouping, however that would be an interesting thing to check and potentially implement if it’s possible.
Another thing to note is that WP Crons are activated usually per page visit, so if the WP Cron that executes a single batch has finished, there’s a dead spot in which we lose some seconds. For 10.000 notifications in batches of 100, it’s 100 cycles, it means that if we wait 1 second between cycle, we lose 1,6 min, for 2 seconds we lose 3.3 min, etc… As we said, there’s definitively room for improvement, e.g. one alternative would be to have a script with no execution limit and we can send everything in one single cycle.
Hi @huongcba, thanks for contacting us.
Do you have some PHP API or callback to send custom messages for only one subscribed user?
You can now send notifications using the Perfecty_Push_Integration::notify() method, which is defined as:
/** * Send one notification to the WordPress user specified by $user_id * * @param int $user_id WordPress User Id * @param string $message Message to be sent * @param string $title Title of the message (default: site name) * @param string $image_url Url of the image to show (default: none) * @param string $url_to_open Url to open (default: site url) * @return array Array with [total, succeeded] * @throws ErrorException * @since 1.2.0 */ public function notify( $user_id, $message, $title = '', $image_url = '', $url_to_open = '' ) { $payload = Perfecty_Push_Lib_Payload::build( $message, $title, $image_url, $url_to_open ); return Perfecty_Push_Lib_Push_Server::notify( $user_id, $payload ); }`
Forum: Plugins
In reply to: [Perfecty Push Notifications] OneSignalHow does OneSignal send 10,000 notifications in less than a minute = 166 notifications per second?
You can’t compare a Basic Droplet server with 1 Shared vCPU against OneSignal’s entire infrastructure. If you want to do that, you should start by replacing PHP with Rust as OneSignal does, and scale the servers.
What “batch size” controls? Is that number of requests to endpoints?
Batch size define the number of notifications send by a WP job. A notification job runs multiple consecutive WP jobs, and each WP job sends “X batch size” notifications. This is configurable so basically it depends on you and your server characteristics.
As we said, we still have room to improve performance but at the end it will depend on your own infrastructure, naturally because this is self-hosted. Some questions to understand your use case:
– What is an acceptable time for your use case?
– How big is your server in terms of CPU/Memory?
– How many notifications are you planning to send?Forum: Plugins
In reply to: [Perfecty Push Notifications] OneSignal11,390 notifications are sent in about 20 min in a real production website without any impact on the server, having WP Cron enabled (not disabled as you), a batch size of 100, and the server is a DigitalOcean Basic Droplet / 2 GB RAM / 1 Shared vCPU. Currently, we’re fine with those numbers, specially because the server load doesn’t increase that much. So far, we’ve sent around 586,484 notifications in total and we’re very happy with it ??
In case we need to increase the performance, we still have room to do it (by implementing parallel jobs, or adjusting the batch size, or hardware specs, etc).
Forum: Plugins
In reply to: [Perfecty Push Notifications] OneSignalHello @krstarica we will do some internal testing to confirm the outcome with AMP, however we really recommend you to try out the plugin in a test scenario before doing the actual switch. Keep in mind:
– Your setup/themes/plugins
– Performance and throughput requirementsFor the other questions:
2) Isn’t it better to target specific workers such as OneSignalSDKWorker.js instead of removing all of them?
This is difficult because we would have to have a DB of the possible existing Push Providers (OneSignal is just one of tens of them).
3) Does “Remove conflicting workers” influences subdomains? On https://www.domain.com is ok to remove OneSignal service worker, but subdomain.domain.com has its own service worker which has to remain in place.
It shouldn’t affect, web workers are per origin and the subdomains are different origins.
4) Will this procedure populate Users table with UUIDs and Endpoints from existing OneSignal’s users?`
Yes, it will automatically re-register the users that have already provided Browser Notifications permissions to your website.
Forum: Plugins
In reply to: [Perfecty Push Notifications] Select icon from media libraryThanks @krstarica for reporting, we’ve included it here: https://github.com/perfectyorg/perfecty-push-wp/issues/68
Forum: Plugins
In reply to: [Perfecty Push Notifications] Website should be on HTTPSHi @krstarica this has been reported here: https://github.com/perfectyorg/perfecty-push-wp/issues/74. Thank you!