No one can solve this problem if CSDN cannot.

Source: Internet
Author: User
No one can solve this problem if CSDN cannot. I have a collection task. Test locally and collect data normally. It can be stored on the server or collected. But .... After the content of the target site is updated, it will take several hours to collect the content on the server. (Sometimes every other day) instead of local, you don't have to wait, as long as the target station has data, you can collect it. It feels like this problem cannot be solved by CSDN, so no one can solve it.
I made a collection. Test locally and collect data normally.

It can be stored on the server or collected. But ....

After the content of the target site is updated, it will take several hours to collect the content on the server. (Sometimes every other day)

The data on the target station can be collected locally without waiting.


It feels like the web page is not refreshed when data is collected.




Is it a server problem? Or is the program not good enough? (In the program, the page is reloaded every time you refresh it! And added random characters). I have read the company's technology and said that the program is okay.


I asked the space service provider, and he asked me to report an error. how can I report it? Please help the experts in the experts!

What is the problem?

------ Solution --------------------
Discussion

QQ288801 thank you for checking it out

------ Solution --------------------
You can paste the collected code.
------ Solution --------------------
Is there a cache on the server?
------ Solution --------------------
The other party must have blacklisted your ip address. you can use the adsl connection mode to regularly reconnect to the network. in this way, if you change the ip address repeatedly, the other server will not be able to cope with it, here is a script for you to re-connect to adsl at regular intervals.
PHP code
$ I = 1; while (true) {sleep (120); if (cutNet () {sleep (10); if (connectNet () {echo "successfully connected ". $ I. "Times \ r \ n";} else {echo "not connected \ r \ n" ;}} else {echo "connection disconnected \ r \ n ";} $ I ++;}/*** ADSL dialing */function connectNet ($ cNum = 0) {exec ("rasdial.exe ADSL adsl_name adsl_pwd", $ out1, $ ars1 ); print_r ($ out1); if (preg_match ('/connected ADSL/', $ out1 [3]) or preg_match ('/connected ADSL /', $ out1 [4]) {return true;} else {return false;} fun Ction cutNet () {if (isConnect () {exec ("Rasdial ADSL/disconnect", $ out1, $ ars1 ); // disconnection if (preg_match ('/Finished/', $ out1 [0]) {return true;} else {return false ;}} else {return true ;}} function isConnect () {exec ("Rasdial", $ out1, $ ars1); // disconnected if ($ out1 ['0'] = 'no connection ') {echo "no connection found... \ R \ n "; return false;} return true ;}
------ Solution --------------------
How do I use ADSL for a fixed IP address on the server?
Use a proxy
Discussion
The other party must have blacklisted your ip address. you can use the adsl connection mode to regularly reconnect to the network. in this way, if you change the ip address repeatedly, the other server will not be able to cope with it, here is a script for you to re-connect to adsl at regular intervals.

PHP code



$ I = 1;
While (true)
{
Sleep (120 );
If (cutNet ()){
Sleep (10 );
If (connectNet ())
......

------ Solution --------------------
Discussion

I am a VM. IP address of Japan... the first time I collected data on this server... He knows?

What else is the proxy on the VM?

------ Solution --------------------
Function isConnect ()
{
Exec ("Rasdial", $ out1, $ ars1); // disconnected
If ($ out1 ['0'] = 'no connection '){
Echo "no connection found... \ R \ n ";
Return false;
}
Return true;
}


------ Solution --------------------
According to the description, your local machine and your server are not in the same region, right? I refer to provinces and cities.

It may also be caused by CDN. although different provincial and municipal operators access the same domain name, the Accessed host and content may be inconsistent, and CDN synchronization takes time.

If you want to solve this problem, just create a server on your local device.

------ Solution --------------------
To collect sites in China, it is suitable to use domestic hosts from any angle.
Well, we also have a LAN.

Discussion

Reference:
According to the description, your local machine and your server are not in the same region, right? I refer to provinces and cities.

It may also be caused by CDN. although different provincial and municipal operators access the same domain name, the Accessed host and content may be inconsistent, and CDN synchronization takes time.

If you want to solve this problem, just create a server on your local device.


That is, changing the server, right?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.