PHP Remote Call API 500 error resolution

Source: Internet
Author: User
Tags server error log
PHP Remote Call API 500 error
function Getinventory ($code) {
$req = new Inventorygetrequest ();
$req-Setproductcode ($code);
$client = new Defaultsuningclient (Server_url, App_key, App_secret, FORMAT);
$resp = Execute ($req) $client;
$response = Json_decode ($resp, true) [' sn_responsecontent '];
if (Isset ($response [' Sn_error '])) {
return false;
} else {
return $response [' sn_body '] [' inventory '] [' invnum '];
}
}
Write a function to call the other side of the API remotely, when the number of records, such as about 100, run normally, record a number of words such as more than 3000 reported 500 errors

Internal Server Error

The server encountered an internal error or misconfiguration and is unable to complete your request.

Please contact the server Administrator @ [email protected] to inform them of the time this error occurred, and the Actio NS you performed just before this error.

More information on this error is available in the server error log.


Initial thinking is not the remote API response time-out, the level is limited, will not one by one troubleshooting, please be able to guide the maze.

------to solve the idea----------------------
The problem with the target site is not related to your code.
  • Related Article

    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.