woocommerce - CSV Import Script stops after a several minutes -
i writing woocommerce csv import script. csv file has 1000 rows. in localhost 1000 rows creating products in 40 minutes. when upload script in hostgator live server creates 200 - 300 rows , stops creating products no errors. have set set_time_limit(0); no luck.
it working fine in localhost not in live server. assume problem related server configuration. can me trace out problem?
first of all
max_input_time , set_time_limit(0)
will work vps or dedicated servers . instead of can follow rules implementation below
- first read whole csv file .
- then grab 10 entries (rows) or less , make ajax calls import in db
- try call ajax every time 10 entries , after echo out on browser . in method script never timeout .
- follow same method untill csv rows finished .
Comments
Post a Comment