简体   繁体   中英

Tracking down a PHP performance issue

I have a PHP script which runs fine on a Raspberry Pi PHP 5.4.4, but when I run the same script on a Cubieboard2 ( about twice the power of the Pi) PHP 5.4.6 I get a long delay. In both cases there is no caching of the PHP as far as I know. The problem seems to be with a file_get_contents request which is retrieving some xml from the web. Although if I enter the same information in a browser in the same system it comes back quickly enough.

There are no related entries in /var/log/apache2/error.log

Any ideas of how to track the problem down.

Thanks

Check if both systems have the same settings for ipv6. Some distributions have ipv6 enabled and tries that before ipv4.

Could be a reverse DNS lookup with a invalid resolve setup. Check if apache(or your webserver) has set reverse dns for logging.

Check https://serverfault.com/questions/100225/apache-httpd-wont-stop-doing-reverse-dns-requests-for-clients-ips or just google it

And check if you can ping www.google.at from a shell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM