A
A
Anton2018-02-01 07:19:34
PHP
Anton, 2018-02-01 07:19:34

Server load due to the parser: how to watch?

Hello!
For the site page, I parse variable data (about 4 lines from each) from four other sites through Php Simple DOM.
Each site parses a separate php file made by me. On the page, the data is displayed through:

<?php
 $content = file_get_contents('https://site.ru/parser.php');
echo iconv("UTF-8", "UTF-8", $content);
?>

There are four such requests-conclusions on the page.
Various errors are displayed in the error logs: either the donor site is unavailable (very rarely), or the lack of information in the lines (which is not critical), but the parser works and everything is displayed.
The question itself is as follows:
How to look at the total load on the hosting (and whether it will be), because if my page is requested a couple of times a day and the parser is also launched a couple of times, then this is not critical, but if the page traffic increases many times, and even hundreds requests at the same time? What server settings will need to be tweaked or libraries installed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2018-02-01
@opium

You can’t do much optimization here, it’s different to increase the number of phr threads
And just save the sites to disk and give it from the disk, and update the domain once every five minutes for the crown

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question