November Happy Hour will be moved to Thursday December 5th.

Indexing ImageVault files made the entire site stopped working

Vote:
 
Hi Today I tried to Index ImageVault Files using a custom ImageVault Sheduled Job. It took around 30 minutes then it shown the message as time out exception occured. But the Entire website is not working during the Indexing of IV files. Can you please tell me how much time It normally take to index a 5 MB file . I have to Index 1400 IV files of different formats like PDFs, Documents,Videos. And One more question is it gave me a null reference error as "object reference can't set to an instance of an object" does it because of the file doesn't exist or any other error. Can you tell me how we can set the time limit to index one file also. Thanks.
#71367
May 16, 2013 13:46
Vote:
 

Hi!

Could you provide some additional information about how you have written the scheduled job? Normally accessing ImageVault thru the API will not cause the site to stop working, but it is hard to give any advice on how to address this without more information.

If you also could provide the stack trace from the error we might be able to give you a hint to the cause.

#71406
May 17, 2013 8:35
Vote:
 
Thanks Johan. I found that running scheduled job using a seperate thread will solve the problem. Please check below code I'm using for indexing the ImageVault files : We are yet to move the latest code to production , please let me know if the curret code have any errors are If I'm missing anything. public static void Execute() { Thread _worker = null; try { _worker = new Thread(new ThreadStart(Start)); _worker.Start(); } catch (Exception ex) { ------ } } In the Indexing method I have the code as follows foreach (IVAlbumData ad in IVDataFactory.GetChildAlbums(IVDataFactory.RootAlbumId)) { if (albumsToIndex.Contains(ad.Name.ToUpper())) { foreach (IVFileData fd in ad.GetFiles(true)) { try { ImageStoreNET.Classes.Data.DataFactory.Instance.GetDataObject(fd.Id, out _dataObject); if (_dataObject == null) { //write in log as file not found } else { try { if (indexableFileExtensions.Contains(fd.Extension.ToUpper())) { var document = new ImageVaultDoc(); document = new ImageVaultDoc() { AlbumId = fd.AlbumId, Id = fd.Id, Name = fd.Name, Categories = fd.Categories.Cast(), PortalTitle=PortalTitleList, Attachment = new EPiServer.Find.FileAttachment(filePath) }; var result = client.Index(document, x => x.Id = fd.Id); } } } } catch (Exception ex) { ------ } } } }
#71739
May 28, 2013 6:55
Vote:
 

Hi again!

I have looked at the code provided, but fail to see the big picture. Could you please provide a more complete example? Email my directly if you don't wan't put it on the forum. From the description it sounds like some kind of locking issue but it is hard to draw any conclusions with out being able to see how everything is tied togheter.

It might also be possible to get more information by turning on logging. If it is possible to narrow down the scope of where the looking problem might be located it will help a lot.

Also if it is possible to give me a stack trace regarding the problem you had, that would be most helpfull.

#71773
May 28, 2013 17:09
* 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.