grandnode / grandnode2

Open-Source eCommerce Platform on .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB & Vue.js
https://grandnode.com/
GNU General Public License v3.0
1.04k stars 422 forks source link

Randomly facing exception while loading some pages -- The system cannot open the device or file specified. : '62b74b89423cc4b401be2007_rubber-collar-for-7-inch-diameter-hose_100.JPG' #296

Closed Nikhil13x closed 1 year ago

Nikhil13x commented 1 year ago

Sometimes this exception will be shown in some pages.. it will contnue to show the same until the application is restarted. After the restart, it works fine. The issue reoccurs after few days..

Based on the stacktrace, I suspect the mutex has some issue. We have only one instance of the application running... so can't suspect on the concurrency issue.

The stacktrace as below.

System.IO.IOException: The system cannot open the device or file specified. : '62b74b89423cc4b401be2007_rubber-collar-for-7-inch-diameter-hose_100.JPG' at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew) at Grand.Business.Storage.Services.PictureService.GetPictureUrl(Picture picture, Int32 targetSize, Boolean showDefaultPicture, String storeLocation) in /home/runner/work/i_commerce/i_commerce/src/Business/Grand.Business.Storage/Services/PictureService.cs:line 413 at Grand.Business.Storage.Services.PictureService.<>cDisplayClass20_0.<b0>d.MoveNext() in /home/runner/work/i_commerce/i_commerce/src/Business/Grand.Business.Storage/Services/PictureService.cs:line 329 --- End of stack trace from previous location --- at Grand.Infrastructure.Caching.MemoryCacheBase.GetAsync[T](String key, Func`1 acquire, Int32 cacheTime) in /home/runner/work/i_commerce/i_commerce/src/Core/Grand.Infrastructure/Caching/MemoryCacheBase.cs:line 65 at Grand.Business.Storage.Services.PictureService.GetPictureUrl(String pictureId, Int32 targetSize, Boolean showDefaultPicture, String storeLocation) in /home/runner/work/i_commerce/i_commerce/src/Business/Grand.Business.Storage/Services/PictureService.cs:line 330 at Grand.Web.Admin.Services.ProductViewModelService.PrepareProductsModel(ProductListModel model, Int32 pageIndex, Int32 pageSize) in /home/runner/work/i_commerce/i_commerce/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs:line 836 at Grand.Web.Admin.Controllers.ProductController.ProductList(DataSourceRequest command, ProductListModel model) in /home/runner/work/i_commerce/i_commerce/src/Web/Grand.Web.Admin/Controllers/ProductController.cs:line 137 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gLogged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.gAwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Grand.Web.Common.Middleware.WorkContextMiddleware.Invoke(HttpContext context, IWorkContext workContext) in /home/runner/work/i_commerce/i_commerce/src/Web/Grand.Web.Common/Middleware/WorkContextMiddleware.cs:line 69 at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Grand.Web.Common.Middleware.PoweredByMiddleware.InvokeAsync(HttpContext context, IPoweredByMiddlewareOptions options) in /home/runner/work/i_commerce/i_commerce/src/Web/Grand.Web.Common/Middleware/PoweredByMiddleware.cs:line 26 at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context) at Grand.Web.Common.Middleware.InstallUrlMiddleware.InvokeAsync(HttpContext context) in /home/runner/work/i_commerce/i_commerce/src/Web/Grand.Web.Common/Middleware/InstallUrlMiddleware.cs:line 48 at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Misc.SeoTools.StartupApplication.<>c.<b__3_0>d.MoveNext() --- End of stack trace from previous location --- at Grand.Web.Common.Middleware.DbVersionCheckMiddleware.Invoke(HttpContext context, ICacheBase cacheBase, IRepository`1 repository) in /home/runner/work/i_commerce/i_commerce/src/Web/Grand.Web.Common/Middleware/DbVersionCheckMiddleware.cs:line 47 at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

KrzysztofPajak commented 1 year ago

Hello, Thanks for issue but we can't reproduce your issue on the develop version.