Support » Plugin: Stock Ticker » Heavy CPU

  • Hi Aleksandar –

    I went live with our new WP website over the weekend using the stock ticker on every page. Today was the first busier day (about 1000 concurrent users) and I was getting very high CPU on the box. The hosting provider gave the info at the bottom, saying that the CPU was from high numbers of ajax requests from the stock ticker plugin.

    We’re using the plugin in a fairly unusual way. We’re publishing our own tickers, so they’re not pulling from AlphaVantage. We have a daily job that drops the ticker data directly into the WP database.

    Because of that, I had the cache timeout set very high, 86400. Ideally, I’d like to cache the data for several hours before needing to refresh. Is there a configuration option that will let me do that?


    Header Status Returns: non-HIT’s, sorted by most up top:
    21659 200-“POST /wp-admin/admin-ajax.php
    Please understand that these types of requests are uncached:

    Request URL: /wp-admin/admin-ajax.php
    Request Method: POST
    Status Code: 200
    Remote Address:
    Referrer Policy: no-referrer-when-downgrade
    action: stockticker_load
    show: name
    number_format: cd
    decimals: 2
    static: 0
    speed: 65
    empty: true
    duplicate: false

Viewing 1 replies (of 1 total)
  • Hi @fergusc,

    We have two AJAX requests from front-end:

    1. stockticker_load is used to load fresh ticker and prevent caching plugins to always show unchanged stock data. This can not be overridden without significant change of plugin code, which lead to custom optimized version of Stock Ticker. Your developer could develop that, or if you prefer you can contact me for a quote.
    2. stockticker_update_quotes is used to trigger quote update from Alpha Vantage. This can be disabled by replacing files listed below with versions from gist
    1. /wp-content/plugins/stock-ticker/assets/js/jquery.stockticker.js
    2. /wp-content/plugins/stock-ticker/assets/js/jquery.stockticker.min.js


Viewing 1 replies (of 1 total)
  • The topic ‘Heavy CPU’ is closed to new replies.