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?

    Thanks

    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: 3.93.118.23:443
    Referrer Policy: no-referrer-when-downgrade
    action: stockticker_load
    symbols: OTRI.USA,WAIT.USA,OTVI.USA,DATVF.VEU,DATVF.VNU,DATVF.VSU,DATVF.VWU
    show: name
    number_format: cd
    decimals: 2
    static: 0
    class:
    speed: 65
    empty: true
    duplicate: false

Viewing 1 replies (of 1 total)
  • Plugin Author Aleksandar Urošević

    (@urkekg)

    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 https://urosevic.net/c/ 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 https://gist.github.com/urosevic/ae1afc8533ead1e5d8bebbbdb69578b6
      1. /wp-content/plugins/stock-ticker/assets/js/jquery.stockticker.js
      2. /wp-content/plugins/stock-ticker/assets/js/jquery.stockticker.min.js

    Thanks,
    Aleksandar

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