We received a report from AndroidPolice that their manual syncing was failing with an ERR_INSUFFICIENT_RESOURCES error. This is likely due to the fact that each comment that is synced makes a separate request, so manually syncing large sites could result in >1000 parallel requests.
In response, these changes limit the number of parallel comment-sync requests to 100, which should increase stability but we also expect it to slightly increase the time it takes to manually sync a large number of comments. Because of this, I've also added additional progress logging to the manual-sync process.
Unfortunately, I wasn't able to actually reproduce the ERR_INSUFFICIENT_RESOURCES error prior to limiting the requests so I'm assuming that this could have to do with available resources and hardware capabilities, though I did get some comments failing to sync and Danny mentioned that he saw sync requests that were returning 200's but weren't actually getting synced in the WP database.
The reasoning for setting the parallel request limit to 100 was influenced by the initial report citing that they got the ERR_INSUFFICIENT_RESOURCES error after a couple of hundred requests were sent, though I'm still open to adjusting this threshold.
There was also a version that was incorrect in the last disqus/README.txt changelog update, so I threw that fix in there too.
Motivation and Context
Received a report from AndroidPolice that their manual syncing was failing with an ERR_INSUFFICIENT_RESOURCES error.
How Has This Been Tested?
Tested on a production WordPress site with the following workflow:
Change the "Plugin Name" in disqus/disqus.php to differentiate from the production plugin
Run make js && zip -r disqus.zip disqus
Go to the WP admin and go to Plugins > Add new
Click the "Upload Plugin" button at the top of the page
Upload the zip created in step 2
Deactivate the existing Disqus plugin and activate the newly uploaded version
Go to the Disqus page in the WP admin and click the "Syncing" tab
Click "Manually Sync Comments" and enter a date range containing a >1000 comments
Click "Run Manual Sync"
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
Description
We received a report from AndroidPolice that their manual syncing was failing with an
ERR_INSUFFICIENT_RESOURCES
error. This is likely due to the fact that each comment that is synced makes a separate request, so manually syncing large sites could result in >1000 parallel requests. In response, these changes limit the number of parallel comment-sync requests to 100, which should increase stability but we also expect it to slightly increase the time it takes to manually sync a large number of comments. Because of this, I've also added additional progress logging to the manual-sync process.Unfortunately, I wasn't able to actually reproduce the
ERR_INSUFFICIENT_RESOURCES
error prior to limiting the requests so I'm assuming that this could have to do with available resources and hardware capabilities, though I did get some comments failing to sync and Danny mentioned that he saw sync requests that were returning 200's but weren't actually getting synced in the WP database.The reasoning for setting the parallel request limit to 100 was influenced by the initial report citing that they got the
ERR_INSUFFICIENT_RESOURCES
error after a couple of hundred requests were sent, though I'm still open to adjusting this threshold.There was also a version that was incorrect in the last
disqus/README.txt
changelog update, so I threw that fix in there too.Motivation and Context
Received a report from AndroidPolice that their manual syncing was failing with an
ERR_INSUFFICIENT_RESOURCES
error.How Has This Been Tested?
Tested on a production WordPress site with the following workflow:
disqus/disqus.php
to differentiate from the production pluginmake js && zip -r disqus.zip disqus
Types of changes
Checklist:
This change is