简体   繁体   中英

Semaphore timeout error while creating a Sql backup in Azure blob storage since 3 days ago

I am using a daily scheduled job to have a backup of my on-premises sql server DB on Azure blob. The command never changed and worked for many months but since 3 days ago started failing. This is the text of the command:

DECLARE @MyFileName varchar(1000)
SELECT @MyFileName = (SELECT 'https://myurl.blob.core.windows.net/full/MyDB_backup_' + convert(varchar(500),GetDate(),112) + '.bak') 
BACKUP DATABASE [MyDb] TO  URL = @MyFileName WITH  CREDENTIAL = N'AzureCredential' ,  COPY_ONLY, NOFORMAT, NOINIT,  NAME = N'MyDb-Full Database Backup', NOSKIP, NOREWIND, NOUNLOAD,  STATS = 1

And this is the output:

1 percent processed.
2 percent processed.
3 percent processed.
Msg 121, Level 20, State 0, Line 24
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)

This creates a 1TB file (while it normally is 6Gb) and when I try to delete it I get this error: There is currently a lease on the blob and no lease ID was specified in the request.

I believe there is a problem with their service as the code I run and database didn't change. However I don't know how to report a bug. I would have raised a ticket for this directly with Microsoft but apparently I would need a "Support Plan". So I posted here as it's the resource they list for their support.

Did you experience this problem before? Where do you think is the most appropriate place I should post this to get an answer?

It seems that the issue has been fixed by Azure today as it started to work again. It started on the 28th of October so it lasted for 5 days.

However, this is not reported in any page about the status of Azure.

If it happens to any of you again apparently the only way is to wait for days until it works.

I will update this thread if the problem happens again.

When using backup to URL on SQL Server 2012 or 2014, SQL allocates a 1 TB page blob so it can store the maximum backup size supported. After the backup process completes the lease on the blob will be removed and the blob will be re-sized to the size of the backup.

If the backup process fails to complete, the allocated file size may potentially remain at the 1TB size, however you will only be billed for the storage actually used by the blob (see the empty disk FAQ here ). Additionally, if error occurs during the backup process an active lease may still be held on the page blob. To deal with deleting blobs with active leases please see this document .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM