Import timeout with Nginx Helper
-
Hi Rahul,
I just ran into the following issue trying a 1.8MB WordPress XML import. At fist, the upload would fail so I added some parameters to nginx.conf among which
client_max_body_size 16M
… After this the upload went through but the actual import process would still take a very long time to finally result in in a blank page. Returning to the admin, I saw only a few of the over 300 posts where imported. I tried again but no improvement. In the php/slow logs I found several traces all looking like this:[20-Nov-2013 22:49:27] [pool www] pid 9158 script_filename = /var/www/scop.pro/htdocs/wp-admin/admin.php [0x00007f5eeccb8310] curl_exec() /var/www/scop.pro/htdocs/wp-includes/class-http.php:1249 [0x00007f5eeccb8168] request() /var/www/scop.pro/htdocs/wp-includes/class-http.php:266 [0x00007f5eeccb7f80] _dispatch_request() /var/www/scop.pro/htdocs/wp-includes/class-http.php:192 [0x00007f5eeccb7e08] request() /var/www/scop.pro/htdocs/wp-includes/class-http.php:309 [0x00007f5eeccb7ce0] get() /var/www/scop.pro/htdocs/wp-includes/http.php:179 [0x00007f5eeccb7ba0] wp_remote_get() /var/www/scop.pro/htdocs/wp-content/plugins/nginx-helper/purger.php:230 [0x00007f5eeccb7a10] _do_remote_get() /var/www/scop.pro/htdocs/wp-content/plugins/nginx-helper/purger.php:222 [0x00007f5eeccb77a0] purgeUrl() /var/www/scop.pro/htdocs/wp-content/plugins/nginx-helper/purger.php:134 [0x00007f5eeccb75c0] _purge_by_options() /var/www/scop.pro/htdocs/wp-content/plugins/nginx-helper/purger.php:115 [0x00007fff586ea9c0] purgePost() unknown:0 [0x00007f5eeccb73b8] call_user_func_array() /var/www/scop.pro/htdocs/wp-includes/plugin.php:429 [0x00007f5eeccb7268] do_action() /var/www/scop.pro/htdocs/wp-includes/post.php:3314 [0x00007f5eeccb6e18] wp_transition_post_status() /var/www/scop.pro/htdocs/wp-includes/post.php:2945 [0x00007f5eeccb6b20] wp_insert_post() /var/www/scop.pro/htdocs/wp-content/plugins/wordpress-importer/wordpress-importer.php:613 [0x00007f5eeccb69b8] process_posts() /var/www/scop.pro/htdocs/wp-content/plugins/wordpress-importer/wordpress-importer.php:116 [0x00007f5eeccb68c8] import() /var/www/scop.pro/htdocs/wp-content/plugins/wordpress-importer/wordpress-importer.php:92 [0x00007fff586eac90] dispatch() unknown:0 [0x00007f5eeccb66d8] call_user_func() /var/www/scop.pro/htdocs/wp-admin/admin.php:301
And in the nginx error log:
2013/11/20 22:54:05 [error] 9395#0: *3381 upstream timed out (110: Connection timed out) while reading upstream, client: xxxxx, server: xxxxx, request: "POST /wp-admin/admin.php?import=wordpress&step=2 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "xxxxx", referrer: "https://xxxxx/wp-admin/admin.php?import=wordpress&step=1&_wpnonce=487d5abb7d"
Looking at the trace again, I noticed the wp_remote_get() from purger.php being mentioned. So I decided to switch off the purging option in Nginx Helper and attempt another import. And what do you know? This time the import completed without apparent hick-ups. All 300+ posts and attachments where imported.
However, looking at the logs again, there still appeared a trace in the php slow log. This time it read:
[20-Nov-2013 23:05:10] [pool www] pid 9619 script_filename = /var/www/scop.pro/htdocs/wp-admin/admin.php [0x00007f5eeccb7de8] curl_exec() /var/www/scop.pro/htdocs/wp-includes/class-http.php:1249 [0x00007f5eeccb7c40] request() /var/www/scop.pro/htdocs/wp-includes/class-http.php:266 [0x00007f5eeccb7a58] _dispatch_request() /var/www/scop.pro/htdocs/wp-includes/class-http.php:192 [0x00007f5eeccb78f0] request() /var/www/scop.pro/htdocs/wp-includes/http.php:163 [0x00007f5eeccb77a8] wp_remote_request() /var/www/scop.pro/htdocs/wp-content/plugins/xml-sitemap-feed/includes/core.php:943 [0x00007f5eeccb75d8] ping() /var/www/scop.pro/htdocs/wp-content/plugins/xml-sitemap-feed/includes/core.php:970 [0x00007fff586ea9c0] do_pings() unknown:0 [0x00007f5eeccb73c0] call_user_func_array() /var/www/scop.pro/htdocs/wp-includes/plugin.php:429 [0x00007f5eeccb7268] do_action() /var/www/scop.pro/htdocs/wp-includes/post.php:3312 [0x00007f5eeccb6e18] wp_transition_post_status() /var/www/scop.pro/htdocs/wp-includes/post.php:2945 [0x00007f5eeccb6b20] wp_insert_post() /var/www/scop.pro/htdocs/wp-content/plugins/wordpress-importer/wordpress-importer.php:613 [0x00007f5eeccb69b8] process_posts() /var/www/scop.pro/htdocs/wp-content/plugins/wordpress-importer/wordpress-importer.php:116 [0x00007f5eeccb68c8] import() /var/www/scop.pro/htdocs/wp-content/plugins/wordpress-importer/wordpress-importer.php:92 [0x00007fff586eac90] dispatch() unknown:0 [0x00007f5eeccb66d8] call_user_func() /var/www/scop.pro/htdocs/wp-admin/admin.php:301
Notice te wp_remote_request() in there? It’s from my own plugin that pings Google on each new publication. I think it gets fired during import too… And so does the purging from Nginx Helper, I suppose?
Any ideas on how to prevent this pinging and purging upon each post during an import?
- The topic ‘Import timeout with Nginx Helper’ is closed to new replies.