Timeout while deleting guests

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I'm trying to delete guests on version 3.8 and i get the following errormessage:

The wait operation timed out

Line 180:            var result = this.Database.ExecuteSqlCommand(transactionalBehavior, sql, parameters);

Can i increase the timeout?
7 years ago
Anyone? The task fails every time!
7 years ago
Hello,

We have encountered the same problem on our demo stores recently.
We investigated it and found out that the issue is caused by the fact that the Log files of our databases were shrunk to 1mb of size and the autogrowth of the same files were turned off.
In order for the Delete Guests procedure to complete successfully, we needed to increase our Log files initial size (sometimes to values up to 1000mb) and run the Delete Guests procedure again.

Also, please note that you need to be careful when shrinking your database. Always check your Log file initial size after shrinking, because, as we found out, the file size after shrinking was always 1mb.

Regards,
Anton
7 years ago
Do you know how i increase the log file in azure? Is it limited in my webconfig?

Nop-Templates.com wrote:
Hello,

We have encountered the same problem on our demo stores recently.
We investigated it and found out that the issue is caused by the fact that the Log files of our databases were shrunk to 1mb of size and the autogrowth of the same files were turned off.
In order for the Delete Guests procedure to complete successfully, we needed to increase our Log files initial size (sometimes to values up to 1000mb) and run the Delete Guests procedure again.

Also, please note that you need to be careful when shrinking your database. Always check your Log file initial size after shrinking, because, as we found out, the file size after shrinking was always 1mb.

Regards,
Anton
7 years ago
Hello,

I am not really sure how you can achieve that and I have no way of testing it myself at the moment.

I found out that you can connect your Azure database with the SQL Server Management Studio. If you can do that and if you have permissions to change your database settings you can change your log file initial size.

When you connect to your database via SQL Server Management Studio you will need to right click on your database and after that choose properties. A new window will appear. On the top left corner under "Select a page" you will have to choose "Files".
After that under the "Database files:" you should find your log file (the File Type should be "Log"). Change that rows Initial Size to whatever suits your needs.

Note: I would like to repeat again that I am really not sure this is how it is done in Azure. I would suggest you wait for input from someone else.

Note: I found this article when searching how to connect azure database with SQL Management Studio.

Regards,
Anton
7 years ago
http://i.imgur.com/L9KLDxO.png

I dont see files. No permission i guess? I can probably change it if so
7 years ago
Hello,

I can see you cannot access that part of the properties of your database.

Maybe executing the dbo.DeleteGuests stored procedure might help. The stored procedure is located under "Programmability". You will have to right click it and choose "Execute Stored Procedure...". After, that you will have to check the Pass Null Value of the @CreatedFromUtc and @CreatedToUtc and click Ok.

This should run your stored procedure. The query will fail but some rows will be affected. Executing it multiple times should delete all guests.

Note: You can pass values to the parameters of the stored procedure to your liking so you can narrow down the deletion of guests.

Note: Always backup your database before doing work to it!

Regards,
Anton
7 years ago
Nop-Templates.com wrote:
Hello,

I can see you cannot access that part of the properties of your database.

Maybe executing the dbo.DeleteGuests stored procedure might help. The stored procedure is located under "Programmability". You will have to right click it and choose "Execute Stored Procedure...". After, that you will have to check the Pass Null Value of the @CreatedFromUtc and @CreatedToUtc and click Ok.

This should run your stored procedure. The query will fail but some rows will be affected. Executing it multiple times should delete all guests.

Note: You can pass values to the parameters of the stored procedure to your liking so you can narrow down the deletion of guests.

Note: Always backup your database before doing work to it!

Regards,
Anton


I will try that.

It wont delete customers with orders, right?
7 years ago
Hello,

It is the same procedure that runs when you are trying to delete guests. It should not delete any of your customers.
You can inspect the stored procedure by right-clicking it and selecting Modify before you execute it. It's only 78 rows of code so it is not that long.
I would like to turn your attention to row 34 and 35. I think that should answer your question.

But, even if you are 100% sure what the code will do, you will still need to backup your database beforehand.

Regards,
Anton
7 years ago
Nop-Templates.com wrote:
Hello,

It is the same procedure that runs when you are trying to delete guests. It should not delete any of your customers.
You can inspect the stored procedure by right-clicking it and selecting Modify before you execute it. It's only 78 rows of code so it is not that long.
I would like to turn your attention to row 34 and 35. I think that should answer your question.

But, even if you are 100% sure what the code will do, you will still need to backup your database beforehand.

Regards,
Anton


Hello. I will try that.

Do you know why i cant find 'execute stored procedure' after right clicking the procedure?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.