-
AuthorPosts
-
February 12, 2021 at 6:17 am #33727Tony BurkeGuest
Hi there, I am having difficulty finalising the setup of Azure CDN with w3 Total Cache
I am getting the following error when selecting “test Microsoft Azure Storage upload” to verify the container in the CDN settings:
Error: Unable to list containers (cURL error 3: (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)).
I’ve spoken to the Microsoft Azure team a couple of times now and I have been unable to get the test to work despite reviewing numerous configurations with them of the Replace Site Hostname, security settings etc.
Can you please clarify the format of the “Replace Site’s hostname with” URL? 3rd party sites recommend using “http://[account_name].blob.core.windows.net/%5Bcontainer_name%5D” but I tried this format and got the same “unable to list containers” error
Also, I have tried a CNAME as well, setting it to point to the Azure CDN Endpoint (“endpoint hostname”) , but I am still getting the same error!Any pointers you can provide would be much appreciated, because half of the pictures on my website are no longer working because this CDN is only partially implemented!
February 12, 2021 at 6:32 am #33732Marko VasiljevicKeymasterHello Tony,
I am sorry about the issue you are experiencing with setting up Azure CDN with W3 Total Cache and I am happy to assist you with this.
The replace hostname should be automatically populated after connecting with the Account key as you can see in the image below:
I would recommend checking out this article which explains the proper setup of Azure CDN with W3 Total Cache.
Please let me know if you have any other questions.
Thanks!- This reply was modified 3 years, 9 months ago by Marko Vasiljevic.
February 12, 2021 at 9:05 am #33736Tony BurkeGuestHi Marko,
Thank you for getting back to me so quickly. I have actually been using the article you recommended as a reference through this entire process, and shared it with the Microsoft Azure CDN team as well!The “Replace Site hostname” was unfortunately not automatically populated after connecting with the account key – is there a way I can reset these settings to try and set up again from scratch, now that I now the CDN is configured correctly at the Azure side (I’ve tested uploads etc.)?
Thanks
TonyFebruary 12, 2021 at 9:09 am #33742Marko VasiljevicKeymasterHello Tony,
The settings are saved in wp-content/w3tc-config/master.php Make sure to make a backup of the mentioned file.
YOu can manually replace the lines around line 572 (depending on the configuration) with default values:"cdn.azure.user": "", "cdn.azure.key": "", "cdn.azure.container": "", "cdn.azure.cname": [], "cdn.azure.ssl": "auto",
Once you save the changes, go to Performance Dashboard and re-enable CDN (make sure CDN is disabled before this), and select Microsoft Azure Storage from the CDN type menu.
Once you go to Performance>CDN the values should be default.
Thanks!February 15, 2021 at 9:08 am #33780Tony BurkeGuestHi Marko, thanks for the default settings suggestion for the master/.php file!
I was able to get to the next step and successfully pass the “Test Microsoft Azure Upload” test ; it turns out that his issue was with the “account name” parameter – I had use the Azure account name, and it actually requires the Storage account name
However, my next step was to attempt to “export the media library”; when I select this option, it opens the “Media Library export” window, but on selecting the upload button, it gets stuck at “processing”
Is there another setting I may be missing here, or a workaround to upload the Media Library?
Thanks
TonyFebruary 15, 2021 at 9:08 am #33786Tony BurkeGuestHi Marko, thank you for the instructions on resetting the CDN parameters, and I have now managed to set up the Azure CDN and get a “test Pass” result when testing storage upload.
However, when I then try to “export the media library”, the process just times out – how do I ensure this export process works?
Thanks!
TonyFebruary 15, 2021 at 9:13 am #33809Marko VasiljevicKeymasterHello Tony,
Thank you for the information and I am glad you managed to set up the CDN successfully.
Check if you have the information about the Unsuccessful transfer queue, click the button near it and try to re-upload files.
if works – it’s a temporary issue linked to server resources.
Also, make sure to check your master.php file. If cdn.force.rewrite”: “1 should be avoided in the long-term since it causes continuous reuploads of the same files. Just change it to cdn. force.rewrite”: “0
Thanks!February 15, 2021 at 12:00 pm #33810Tony BurkeGuestHi Marko,
I have emptied the Purge Que, Delete Queue and Upload Queue from the “Unsuccessful Transfer Queue” button , and checked the “cdn.force.rewrite” value in Master.PHP, which was already set to “False”, but then when I tried re-uploading from “Export Media Library” I again got a “Request Failed” message after about 8 minutes
Which server resources have the issue, and would FTP be a more reliable way of doing the initial upload?February 15, 2021 at 12:06 pm #33833Marko VasiljevicKeymasterHello Tony,
Thank you for the info.
Can you please check your error log?
If the error.log is not showing anything there is a possibility that the upload timed-out and it takes too much time for your host to upload file and timeout are set to lower value to process responses on your host.
So, in this case, you should increase it.
There is also a possibility that Wordfence or some other security plugin or firewall could be blocking W3TC from accessing too many directories/files at once.
Thanks!February 16, 2021 at 12:34 pm #33889Tony BurkeGuestHi Marko,
Thanks for the suggestions. However, I tried deactivating Wordfence and then trying the “Export Media Library” again but just get the timeouts again
I also don’t see error.log anywhere , nor can I see anywhere to increase the timeout value, although these timeouts are already taking between 2 and 8 minutes, with 0 files successfully uploaded in that time?Thanks
TonyFebruary 16, 2021 at 12:37 pm #33912Marko VasiljevicKeymasterHello Tony,
Thank you for the information and I am sorry that the issue is still occurring.
Please check this article about the wp debug and error logs. From what you’re saying the uploads times out for some reason so you should check if there are any errors in the log, wp-debug or any PHP errors.
Thanks!February 19, 2021 at 10:09 am #34059Tony BurkeGuestThanks Marko, at this stage we’ve had too many issues on our live site so I’ve had to disable the CDN and will have to try out these suggestions on a staging version of our site, which I haven’t set up as yet
-
AuthorPosts
- The topic ‘Azure CDN Configuration issue with or without CNAME’ is closed to new replies.