Hello.
We use Umbraco 7.2.4 with load-balancing for our high load website. We have three servers for our website and one dedicated DB server.
And we have problems with image loading on the main server.
We using this code to load images:
var mediaService = ApplicationContext.Services.MediaService;
byte []mediaBytes=GetImageBytes();
var newImage = mediaService.CreateMedia(fileName, parentId, "Image");
MemoryStream strm = new MemoryStream(mediaBytes);
newImage.SetValue("umbracoFile", fileName, strm);
mediaService.Save(newImage);
When this code executes many times (we can load images 5000 times per day) our front-end servers have overload (cpu 99%). Sometimes we have database timeout exception, or our website just hangs, freezes when images loads. When this situation occurs (images loads), the following messages are logged on main server:
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 84] Index created for node 429675, Provider=InternalIndexer, NodeId=429675
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 81] Index created for node 429675, Provider=ExternalIndexer, NodeId=429675
2015-10-26 11:02:31,023 [45] DEBUG Umbraco.Core.Sync.DefaultServerMessenger - [Thread 71] Invoking refresher Umbraco.Web.Cache.MediaCacheRefresher on single server instance, message type RefreshByJson
And we have following messages on front-end servers:
*2015-10-26 11:02:44,434 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 61] Index created for node 429675, Provider=InternalIndexer, NodeId=429675 *
2015-10-26 11:02:44,512 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 37] Index created for node 429675, Provider=ExternalIndexer, NodeId=429675
How can we solve this problem?
Maybe can we prevent to run ReIndex and MediaCacheRefresher after each image loading and run it manually?
Image loading causes server overload
Hello. We use Umbraco 7.2.4 with load-balancing for our high load website. We have three servers for our website and one dedicated DB server. And we have problems with image loading on the main server. We using this code to load images:
When this code executes many times (we can load images 5000 times per day) our front-end servers have overload (cpu 99%). Sometimes we have database timeout exception, or our website just hangs, freezes when images loads. When this situation occurs (images loads), the following messages are logged on main server:
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 71] ReIndexNode with type: media, Provider=InternalIndexer, NodeId=429675
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 71] AddSingleNodeToIndex with type: media, Provider=InternalIndexer, NodeId=429675
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 71] ReIndexNode with type: media, Provider=ExternalIndexer, NodeId=429675
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 71] AddSingleNodeToIndex with type: media, Provider=ExternalIndexer, NodeId=429675
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 84] Index created for node 429675, Provider=InternalIndexer, NodeId=429675
2015-10-26 11:02:29,367 [45] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 81] Index created for node 429675, Provider=ExternalIndexer, NodeId=429675
2015-10-26 11:02:30,539 [45] DEBUG Umbraco.Web.UmbracoModule - [Thread 84] Begin request: http://srv-01.tdec.local/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds.
2015-10-26 11:02:31,023 [45] DEBUG Umbraco.Core.Sync.DefaultServerMessenger - [Thread 71] Performing distributed call for refresher Umbraco.Web.Cache.MediaCacheRefresher, message type: RefreshByJson, servers: http://srv-01.tdec.local/umbraco/webservices/cacheRefresher.asmx;http://serv-2.tdec.local/umbraco/webservices/cacheRefresher.asmx;http://serv-3.tdec.local/umbraco/webservices/cacheRefresher.asmx, ids: , json: [{"Path":"-1,1063,429676","Id":429676,"Operation":0}]
2015-10-26 11:02:31,023 [45] DEBUG Umbraco.Core.Sync.DefaultServerMessenger - [Thread 71] Invoking refresher Umbraco.Web.Cache.MediaCacheRefresher on single server instance, message type RefreshByJson
And we have following messages on front-end servers:
[Thread 57] ReIndexNode with type: media, Provider=InternalIndexer, NodeId=429675 2015-10-26 11:02:44,293 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 57] AddSingleNodeToIndex with type: media, Provider=InternalIndexer, NodeId=429675 2015-10-26 11:02:44,293 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 57] ReIndexNode with type: media, Provider=ExternalIndexer, NodeId=429675
2015-10-26 11:02:44,293 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 57] AddSingleNodeToIndex with type: media, Provider=ExternalIndexer, NodeId=429675
*2015-10-26 11:02:44,434 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 61] Index created for node 429675, Provider=InternalIndexer, NodeId=429675 *
2015-10-26 11:02:44,512 [16] DEBUG UmbracoExamine.DataServices.UmbracoLogService - [Thread 37] Index created for node 429675, Provider=ExternalIndexer, NodeId=429675
How can we solve this problem?
Maybe can we prevent to run ReIndex and MediaCacheRefresher after each image loading and run it manually?
is working on a reply...