• Resolved miclovin

    (@miclovin)


    My site crashed recently and I had long discussions with developers and the host about what could have caused it. Turns out there is a CloudPRNT Bot that is overwhelming and slowing down the site. Im not sure how the bot works but it has your name all over it. If you could please help me fix this so my site can be more stable would be appreciated. Here is the main point from a dev:

    I've checked your site and in fact the performance for this amount of traffic isn't what we'd expect it to be. On some further checking, I've noticed that there is a bot that's making almost 10.000 requests per day and that may be the cause of the resource issues here.
    
    The bot is using this User Agent string:
    
    CloudPRNT/3.0 HI01X02X/1.9.1

    BTW, aside from the bot my site only receives a couple hundred visitors on a busy day. Small but important traffic for my business.

    • This topic was modified 3 years, 5 months ago by miclovin.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor lawrenceowen

    (@lawrenceowen)

    @miclovin

    That isn’t really a bot, it’s your printer connecting to your site to see if there is an order to be printed. You may have set it up to connect on 1s intervals which can definitely cause a lot of requests. In most cases, this will not put any noticeable strain on a site, but if it is, you can easily reduce it.

    Connect to the printer’s built-in configuration page (in the same way that you initially did when configuring the printer to connect to your site), and on the CloudPRNT configuration page, just under the CloudPRNT URL setting, you will see a “Polling Time” option. Set this as you like, I usually recommend 10s, but setting it up to 30s or 60s is fine, if you prefer.

    A higher polling time means that it may take a little longer to recognise a new order made on your site and print it, as long as you are happy for it to take up to a minute to print a new order, then 60s is fine.

    Thread Starter miclovin

    (@miclovin)

    Hi Lawerence, thanks for getting back to me so soon. Yes, the Polling Time was an issue when I first setup the plugin and it would not work at all. I think it came default with 10sec and after a long conversation with your US counterpart, I think his name was Gustavo?, we changed the timing to 5sec and the plugin began to work. This was several months ago though and its been working pretty well except for the server load issue. Even at 10sec it would still be making requests 5000 times a day.

    Polling Time. So this was an issue when first configuring the plugin/printer setup. Im reluctant to change it back to default and im also not sure why it never worked at 10sec.

    What can be done? Is there a way for the plugin to send orders instantly rather than the printer go look for it every 5-10 seconds?

    Plugin Contributor Guillermo Cubero

    (@gcubero)

    @miclovin probably me, Guillermo (not Gustavo).

    Unless Lawrence can provide some other suggestion, there isn’t a way to stop the polling while also printing. Polling is how the printer starts communication with your server, requests jobs, and provides job confirmation. In essence, the polling is fundamental to the CloudPRNT solution.

    I think you should definitely try to lower the polling time and see how your server load behaves. While you can’t disable the polling, you can disable automatic printing and print orders manually through the WP/WooCommerce dashboard.
    Keep in mind, this means you need to select each order to be printed.

    Lastly, depending on your server resources (cpu, disk, ram, etc, bandwidth) you might considering increasing those and again see how the server behaves.

    Hope this helps!

    Thread Starter miclovin

    (@miclovin)

    My apologies Guillermo!

    Just a thought: What if the website/printer communication was initiated using a cron job instead of polling from the printer?

    While you can’t disable the polling, you can disable automatic printing and print orders manually through the WP/WooCommerce dashboard.
    Keep in mind, this means you need to select each order to be printed.

    Lastly, depending on your server resources (cpu, disk, ram, etc, bandwidth) you might considering increasing those and again see how the server behaves.

    Since the crash last week my printer has not been working at all. Im not sure if the host blocked the bot or not, its hard to tell. I tried manually printing and it did not work either. Polling time has not changed for now. Is there any way to test and confirm that the printer is setup properly? When I go to edit the printer in the plugin settings it shows connected in green text and seems to be all good. Not sure how to correct these issues but once I get the printer working again I will address the adjusting the polling and server load.

    • This reply was modified 3 years, 5 months ago by miclovin.
    Thread Starter miclovin

    (@miclovin)

    Is it possible the latest woocommerce update has broken the plugin? I have traced my issues back to the day I updated Woo to 5.4.1

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CloudPRNT Bot generating 10,000 requests per day’ is closed to new replies.