Timeout for reading data into the database through the interface

Source: Internet
Author: User
There are 1000 product numbers. using the serial numbers to retrieve product details one by one and then write them into the database, the direct write operation will time out. What are the best methods ?? There are 1000 product numbers. using the serial numbers to retrieve product details one by one and then write them into the database, the direct write operation will time out. What are the best methods ??

Reply content:

There are 1000 product numbers. using the serial numbers to retrieve product details one by one and then write them into the database, the direct write operation will time out. What are the best methods ??

One-time intercept after obtaining all the information. if the data volume is too large, you can split it into several times and insert it in batches.

A better way is to store the product numbers (such as databases, redis, and memcahced), use crontab to regularly obtain several pieces of information each time and insert it into the database, and modify the storage ID status. It is rude to modify the php process time-limit field in the php environment configuration.

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.