Web Farm Timeouts crashing Site

Jay Crowe asked on September 25, 2018 16:53

Hi,

I have a problem where my kentico site is crashing and becoming unusable due to Web Farm Tasks failing and db locks being created on the DB.

When I check the Web Farm tasks the error message I am getting is '[DataConnection.HandleError]: Query: SELECT * FROM CMS_WebFarmServer Caused exception: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.'

They all seem to be of type 'CLEARWEBFARMCONTEXT' but I am not sure what this means?

I have gone through the Web Farm set up and I believe that everything is set up correctly. I am really struggling to find out why the Web Farm set up would be crashing my site.

Any help would be appreciated.

Regards, Jay

Recent Answers


Brenden Kehren answered on September 25, 2018 17:13

What version are you running? There are several issues in v8, v8.1, v8.2 and v9 which are resolved in v10. We recently upgraded a site to v10 and it resolved 99.9% of the webfarm issues we had.

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 25, 2018 17:16

Hi Brenden,

I am currently running version 10.

Cheers, Jay

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 25, 2018 17:41

Can you explain your setup from a server standpoint as well as Kentico Web Farm configuration?

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 25, 2018 17:49

Yeah sure.

We have two web servers and two database servers with a load balancer directly traffic as you would expect.

The web farm mode is set to manual and we have entered the keys into the web configs for Server001 and Server002 with everything ticked for allow synchronization for.

The site runs fine initially orders go through, task are processed on the bus, web server tasks are processed as expected. But the more traffic that comes through the site the worse things become until the site eventually crashes and I have to restart both servers.

We get time out errors of: [DataConnection.HandleError]: Query: SELECT * FROM CMS_WebFarmServer Caused exception: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 25, 2018 17:56

Are you mirroring those databases or do you have one shared database between the 2 web servers?

Any particular reason you are defining the servers and not letting Kentico automatically handle them? I'd highly recommend making that change to automatic and let Kentico handle things better. If you still want to assign server names to scheduled tasks, you can but I'd recommend making the change to auto.

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 26, 2018 10:48

Hi Brendan,

I have followed your advise and set the set up to auto. It seems to be going ok but I need to perform some load tests and make sure the site is running as I expected.

With regards the scheduled tasks (for example Execute Search Tasks) I have multiple tasks set up for each server. Is this necessary? Or do I still need multiple scheduled tasks for each server?

Thanks, Jay

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 26, 2018 13:33

You don't NEED them but in some cases it doesn't hurt. Kentico does a great job of determining which server to use and execute those tasks on.

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 26, 2018 16:53 (last edited on September 26, 2018 16:53)

Hi Brendan,

In terms of the site crashing this now seems to be resolved so thanks for your help. The only problem I now have is that the lucene indexes are not being updated? Any ideas?

Thanks, Jay

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 26, 2018 17:05

Each server will rebuild their own search indexes. You will want to clean up the search index folders and attempt a rebuild of them.

/App_Data/CMSModules/SmartSearch/<searchindexname>

In each of those folders make sure you clean up an lock files.

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 26, 2018 17:14

All of the products and previously created users are there in the indexes. So if I switch over to auto web farm (server names change) I can still search for products etc. If I add something new the index is not updated and the new registered user is not returned for example. I'm sorry but I don't see how a complete rebuild of the indexes will then fix this problem? Surely if the the server could not update the index I would not be getting anything returned in my search results in the first place?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 26, 2018 17:19

If the indexes are not being updated you need to make sure there are no lock files in the file system. Rebuilding the indexes will allow the system to clean things up AFTER you clean the lock files out of the file system.

Check here: /App_Data/CMSModules/SmartSearch/<searchindexname>

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 26, 2018 17:24

Thanks Brendan. There doesn't seem to be any lock files hanging around on either server. I will try completely deleting all of the Smart Search indexes and rebuilding them.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 26, 2018 17:30 (last edited on September 26, 2018 17:30)

Just the files, not the index within Kentico. Make sure you do it on both servers as well. And most importantly, give it time.

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 26, 2018 17:35

Yes sorry that is what I meant. I am going to delete all of the files and then rebuild them. I will be doing this before I leave the office and let it run over night as you said it will take time.

0 votesVote for this answer Mark as a Correct answer

Jay Crowe answered on September 27, 2018 09:51

Hi Brendan,

I have rebuilt my indexes over night. I then created an account this morning through the site created an address for that account but it was not returned in my search results? When I have the manual web farm set up I can create a new account assign an address to that account and the account immediately shows up in the search results. Any thoughts?

Thanks, Jay

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.