Support » Plugin: OneSignal - Web Push Notifications » OneSignal causes website down

  • Resolved incrosnatu

    (@incrosnatu)


    Hi! I have a website sociedelic.com than i use Onesignal plugin on it, i have over 2000 users subscribed, and when i publish a new article and onesignal send notifications to all users, after 30-40 seconds my website go down! And if i don’t send the notification of a new post nothing happens.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author OneSignal

    (@onesignal)

    Hi there,

    Sorry about the delay in replying.

    Your notification’s default icon (if one is not specified) is set to https://www.sociedelic.com/wp-content/uploads/2016/09/my-notification-icon.png. If you are using WordPress’s featured image (it looks like a couple of your posts are), the images are also served from your site.

    If a notification is going out to 1,500 people, and if most of the computers are online and able to receive push notifications at the time you send out the notification, then your server will be hit with a minimum of 1,500 requests for a large image, which can cause your server to choke on resources.

    I would recommend uploading your default notification icon URL on another image host so that your site is free to serve your standard page traffic.

    Although I haven’t tried this, I would recommend using https://wordpress.org/plugins/featured-image-from-url/ or https://wordpress.org/plugins/external-featured-image-pro/ to also serve your featured images from an external image host.

    I fix what you say me, but this time i did’t have problem with my RAM memory increase, but my site go down again 503 Service Unavailable.

    Siteground told my i need more CPU and RAM Memory, i upgraded to 2CPU and 4GB RAM and same problem. If i deactivate OneSignal plugin my website don’t go down.

    This is what Siteground Support told me:

    Hello,

    I have investigated your case and first I would like to explain what causes the errors you are seeing on your end. These are produced because the server gets overloaded and our built-in monitoring service kicks in at this point and starts killing the processes on the server in order to reduce the load and prevent the server from becoming inaccessible. Here are some of the logs from our monitoring system for the last high load occurrence:

    Mar 09 18:51:59 c21556: Critical load (56.07) reached! Killing all php,ftp,smtp,mailnull,archivers procs!
    Mar 09 18:52:01 c21556: High load (56.07) reached!
    Mar 09 18:52:01 c21556: Critical load (56.07) reached! Killing all php,ftp,smtp,mailnull,archivers procs!
    Mar 09 18:52:07 c21556: High load (56.37) reached!
    Mar 09 18:52:07 c21556: Critical load (56.37) reached! Killing all php,ftp,smtp,mailnull,archivers procs!
    Mar 09 18:52:09 c21556: High load (56.37) reached!
    Mar 09 18:52:09 c21556: Critical load (56.37) reached! Killing all php,ftp,smtp,mailnull,archivers procs!
    Mar 09 18:52:14 c21556: High load (56.35) reached!

    I have checked the server logs and from the suexec log (that logs the script executions on the server) I can see that from 18:51:28 to 18:51:48, which is just 20 seconds, there were 259 script executions for your account. This means that 259 scripts were executed in just 20 seconds, which is quite a large amount and I am afraid that the current amount of server CPU cannot handle it.

    For your convenience I have exported the suexec log for that minute in the following file:

    /home/sociedel/suexec_logs.txt

    If you open that file you will see that almost all of the script executions are for the following script:

    /home/sociedel/public_html/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php

    which is part of the plugin you are using on your website to send notifications – onesignal-free-web-push-notifications.

    That plugin is the cause of the problems that you are experiencing and in order to resolve the problem you should either stop using that plugin and use an alternative one or consider adding more CPU to the server so that it is able to handle the huge amount of script executions produced by it.

    Alternatively you could continue the communication with the developers of the plugin and ask them if there is a way of reducing the script executions that their plugin produces when used as this would also resolve the problem.

    If you need any further assistance on our end, please do not hesitate to contact us again.

    Best Regards,

    Georgi K.
    Technical Support Supervisor

    How to disable thumbnails in notifications?

    Glad to run across this thread today! Been driving me nuts trying to figure out what was up with our web server when we’d post a new article.

    In my case, I’m server admin, so I was able to up the MaxRequestWorkers number in Apache as well as moved the logo file to CloudFront.

    I’m hoping the MaxRequestWorkers helps with featured thumbnails on Chrome (since only about half our users are on Chrome) and obviously moving the logo file will reduce server load for all browsers. If all else fails, and it ends up still being an issue, I’ll setup W3 Total Cache so all images are hosted on CloudFront. I wish it was possible to host the three JavaScript files in sdk_files folder in the WordPress plugin, too, though.

    For reference, our list of users that can receive notifications is just a hair under 20,000. EC2 Server has 30GB of RAM (was barely even used, since MaxRequestWorkers was too low) with 4 CPUs (never went past ~25%). Apache should utilize our resources more fully with the updates, and hopefully no more issues with the website going down.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘OneSignal causes website down’ is closed to new replies.