problem with importing in cron
-
Hello
I have a problem with importing in cron (woocommerce).
Support of my hosting, he checked many aspects, but he did not find a solution.
Cron is not able to complete the entire state imposition and prices. The file has over 4000 records. This can be done from 1000 to 2000 and blocks.
The following shows the log from the server:2019-04-03 05:50:12.091601 [NOTICE] [185.xx.xx.xx:35106] oops! 503 Service Unavailable 2019-04-03 05:50:12.091605 [NOTICE] [185.xx.xx.xx:35106] Content len: 0, Request line: 'GET /wp-cron.php?import_key=xxxxxxxxxxx&import_id=15&action=trigger HTTP/1.1' 2019-04-03 05:50:12.091697 [INFO] [185.xx.xx.xx:35106] abort request..., code: 4 2019-04-03 06:50:13.083761 [INFO] [185.xx.xx.xx:48172] connection to [uds://tmp/lshttpd/APVH_xxxxxxxxx_Suphp.sock] on request #0, confirmed, 1, associated process: 185594, running: 1, error: Connection reset by peer! 2019-04-03 06:50:13.083824 [NOTICE] [185.xx.xx.xx:48172] oops! 503 Service Unavailable 2019-04-03 06:50:13.083829 [NOTICE] [185.xx.xx.xx:48172] Content len: 0, Request line: 'GET /wp-cron.php?import_key=xxxxxxxxxxx&import_id=15&action=trigger HTTP/1.1' 2019-04-03 06:50:13.083900 [INFO] [185.xx.xx.xx:48172] abort request..., code: 4 2019-04-03 08:20:13.105353 [INFO] [185.xx.xx.xx:50142] connection to [uds://tmp/lshttpd/APVH_xxxxxxxxx_Suphp.sock] on request #0, confirmed, 1, associated process: 633615, running: 1, error: Connection reset by peer! 2019-04-03 08:20:13.105447 [NOTICE] [185.xx.xx.xx:50142] oops! 503 Service Unavailable 2019-04-03 08:20:13.105452 [NOTICE] [185.xx.xx.xx:50142] Content len: 0, Request line: 'GET /wp-cron.php?import_key=xxxxxxxxxxx&import_id=15&action=processing HTTP/1.1' 2019-04-03 08:20:13.105518 [INFO] [185.xx.xx.xx:50142] abort request..., code: 4 2019-04-03 08:50:13.104484 [INFO] [185.xx.xx.xx:42194] connection to [uds://tmp/lshttpd/APVH_xxxxxxxxx_Suphp.sock] on request #0, confirmed, 1, associated process: 819173, running: 1, error: Connection reset by peer! 2019-04-03 08:50:13.104718 [NOTICE] [185.xx.xx.xx:42194] oops! 503 Service Unavailable 2019-04-03 08:50:13.104728 [NOTICE] [185.xx.xx.xx:42194] Content len: 0, Request line: 'GET /wp-cron.php?import_key=xxxxxxxxxxx&import_id=15&action=trigger HTTP/1.1'
I decided to skip this problem to update only published products.
I have codes, but I do not know why they do not work …function do_not_update_if_draft($post_id, $data, $import_id) { // Check for your import if ($import_id == 5) { // Check if product is draft if ( get_post_status ( $post_id ) == 'draft' ) { return false; } else { return true; } } return false; // this will prevent importing products that are not with import_id = 5 } add_filter('wp_all_import_is_post_to_update', 'do_not_update_if_draft', 10, 3);
function do_not_update_if_draft($post_id, $data, $import_id) { // Check if product is draft if ( get_post_status ( $post_id ) == 'draft' ) { return false; } else { return true; } } add_filter('wp_all_import_is_post_to_update', 'do_not_update_if_draft', 10, 3);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘problem with importing in cron’ is closed to new replies.