locked
createBlockBlobFromLocalFile ESOCKETTIMEDOUT RRS feed

  • Question

  • I'm trying to upload an mp4 video file to Azure. I am working with Node.js.

    If the file is small it works fine, but if it is big (more than 10 mb) it gives me this error:

    ESOCKETTIMEDOUT

    this is the function I use:

    blobService.createBlockBlobFromLocalFile(container, file.name, file.path, options,
                        function (error, result, response) {
                            try {
                                if (error) {
                                    console.log('***** ERROR file NOT uploaded! ' + JSON.stringify(error));
                                    reject(error);
                                }
                                if (!response.isSuccessful) {
                                    reject({error: 'Failed to create blob.'});
                                }
                                console.log('***** createBlockBlobFromLocalFile FILE uploaded! ');
                                resolve();
                            } catch (error) {
                                console.log('***** ERROR file NOT uploaded! ' + JSON.stringify(error));
                                reject(error);
                            }
                        })

    Please can someone help me?

    Thank you so much. Emi

    Wednesday, May 30, 2018 6:08 PM

All replies

  • The socket timeout usually happens when network is poor or network in heavy usage. Try to add retry filter on client library side.

    Refer : https://azure.github.io/azure-storage-node/ExponentialRetryPolicyFilter.html

    Refer the similar discussion over the GitHub .

    --------------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on  your forum experience, click here

    • Proposed as answer by Sandeep BR Wednesday, May 30, 2018 7:56 PM
    Wednesday, May 30, 2018 7:56 PM
  • Hey Emi ,

    Just checking in to see if the above suggestions helped or you need further assistance on this issue.

    Friday, June 1, 2018 4:52 PM