SaaS CMS has officially launched! Learn more now.

Find Indexing job fails early (but seemingly keeps on running in background)

Vote:
 

Hi

We're in the process of upgrading an CMS 11 app to CMS 12.

We upgraded the CMS and Find.Cms packages recently (to 12.22.5 and 15.2.0 respectively) and the index job started to fail every time.

The job enters status "Running" but turns "Failed" early. Here I expect the job to stop, but watchning the log it seems it keeps on running?

Is this the intended behaviour? Are there threads running that's not getting cancelled?

#308056
Edited, Sep 06, 2023 9:31
Vote:
 

Usually it stops with the error:

Cannot create a command without an existing connection, you can use DbFactory to create stand-alone command objects

But then keeps running.

What could be causing this error?

#308064
Sep 06, 2023 13:31
Vote:
 

You should be uprading to 12.16 Parallel Tasks and BackgroundContext | Optimizely Developer Commu

TL;DR: there was a bug with background task which was fixed with latest release 

#308065
Sep 06, 2023 13:44
Vote:
 

Hmm. I was at 12.16 already. Tried upgrading to latest, 12.17.1, but the issue persist.

The error occurs in my development environment, but only occurs intermittently on our testing server.

I'm guessing that if there are some badly developed pages/models that eg. tries to load data on property get, this might interefere with the job running threaded?

#308126
Sep 07, 2023 7:21
Quan Mai - Sep 07, 2023 7:38
You're right, I meant 12.17.1 but wrote 12.16
Vote:
 

It appears that the Index update job is still broken then, as it still fails with the error above.

And it doesn't seem to handle cancellation at all, as it keeps running in the background even though the job finished.

#308324
Sep 11, 2023 7:49
Vote:
 

Funny thing is, if the job runs as scheduled it returns as successful/green.

But looking at the result message, it wasn't, it failed with the same message...

Indexing job [Site name] [content]: Reindexing completed. ExecutionTime: 0 hours 0 minutes 0 seconds. Number of contents indexed: 0.
PCNAME An exception occurred while fetching content. Call on database executor not created on current context and on different thread. Possible rooted IDatabaseExecutor, which is not thread safe..
Indexing job [Global assets and other data] [content]: Reindexing completed. ExecutionTime: 0 hours 0 minutes 0 seconds. Number of contents indexed: 0.
PCNAME An exception occurred while fetching content. Cannot create a command without an existing connection, you can use DbFactory to create stand-alone command objects.
Number of external url best bets indexed: 1
#308326
Sep 11, 2023 9:09
Vote:
 

Finally it seem to work.

Updated CMS.Core to 12.17.1 before as mentioned, but appearantly that didn't bring up the rest of the packages to as well?

So had to individually update each one to 12.17.1, and now it works.

Thanks.

#308340
Sep 11, 2023 13:53
Vote:
 

Yes the bug is actually fixed in EPiServer.CMS.AspNetCore 12.17.1 (optimizely.com) , as it depends on CMS.Core, not the way around, so it's best to upgrade it instead 

#308341
Sep 11, 2023 14:07
Quan Mai - Sep 11, 2023 14:07
It should have been upgraded automatically however, not sure what was wrong
Vote:
 

Ah, that might be it.

Thanks for the help. :-)

#308344
Sep 11, 2023 14:14
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.