Help Increasing Connection Time Out

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 năm cách đây
nop 3.7

Can someone please tell me where to increase the connection timeout. Can no longer upload products.

System.Data.Entity.Infrastructure.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

This is random. It will upload 30 products then timeout. it will upload 100 products then time out. Completely random. Most it will do is a little over 100. Never had this issue before upgrading to 3.7 recently. Permissions are fine.

Also before the upload cpu (IIS worker Process) is running constant at 4-8%. When I start the upload cpu (IIS Worker Process) immediately goes to 95-99%. I even saw it hit 100%. Why is the upload consuming so much of the cpu?

We have a Liquidweb dedicated VPS 16GB ram.
7 năm cách đây
I've had the same error before, but using 3.40...and not when uploading products, so I don't know that this is the actual "reason" for your problem. For me it was due to our SQL Server being at a remote location. I'm also hosted at Liquidweb, and once I procured an additional server for our database and situated it in the same network environment as our web server, I never saw another one of those errors...

To change the connection timeout, go into IIS, go to the Advanced settings of your website. Expand "Limits"...here is where the connection timeout is defined.

Also, in your Web.config, this line has a definition for "forms" timeout..but not sure it would be pertinent.
<forms name="NOPCOMMERCE.AUTH" loginUrl="~/login" protection="All" timeout="43200" path="/" requireSSL="false" slidingExpiration="true" />
7 năm cách đây
Hello Embryo. We are hosting the SQL Server on the web server as well. I'll give the connection timeout a shot first. The only other issue, which I think has something to do with it, is as soon as I start the upload, CPU spikes from steady 4-8% to 95-99%. I'm thinking the CPU is so high the server isn't responding thus a timeout. Makes no sense why a simple job (upload) on the server is consuming so much of the CPU.

Thanks
7 năm cách đây
If I recall, I was having the problem mainly when running the Delete Guests task manually...but also when running reports (using a plugin) with too much data. Like, if I selected too wide a date range, it would peg my CPU out all the way and throw that error.

Like I said, for us, the bottleneck ended up being that there was just potentially too much that could go wrong with the SQL operation over several Internet hops. Just moving our database onto a separate but adjacent server, (a few IP's away on the Nic card) solved our problems.
7 năm cách đây
The timeout in the forms tag isn't what your looking for here.  Its not your session timeout that is affecting you, its a latency problem with SQL and its the SQL time out that needs adjusting. I experienced the same issue with Azure data services.
Open your settings.txt file and append the Connection Timeout property

DataProvider: sqlserver
DataConnectionString: Data Source=yourserver;Initial Catalog=nopdb;Integrated Security=False;Persist Security Info=False;User ID=nop;Password=mypassword;Connection Timeout=300

I had to resolve this issue as I was trying to upload files > 30 MB that were downloadable products.  IIS could receive the files fine, but persisting to the database was always failing...After making the timeout adjustment things were better. (side note: I also increased my DTU on Azure)

embryo is correct though... Nop ootb works best with SQL on the same LAN (these adjustments are required when db is remote).

Thx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.