Is there a max size on the product import?

Is there a max size on the product import? The file im trying is 20mb.

I am getting this error when selecting a file for import:

Litium.Data.DataException: An error occurred while updating the entries. See the inner exception for details. —> Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. —> System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint “FK_File_Folder_FolderSystemId”. The conflict occurred in database “Zandparts-Test-Rev1”, table “Media.Folder”, column ‘SystemId’.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
— End of inner exception stack trace —
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(DbContext _, ValueTuple2 parameters) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementation[TState,TResult](Func3 operation, Func3 verifySucceeded, TState state) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable1 commandBatches, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IReadOnlyList`1 entriesToSave)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Litium.Application.Data.LitiumDbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
— End of inner exception stack trace —
at Litium.Application.Data.LitiumDbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Litium.Application.Data.Batching.BatchDataImpl.Commit()
at Litium.Application.Media.FileServiceImpl.Create(File file)
at Litium.Web.Administration.WebApi.Media.Controllers.FileController.d__37.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Litium.Web.Administration.WebApi.Media.Controllers.FileController.d__20.MoveNext()
— End of stack trace from previous location where exception was thrown —

Litium version: 7

The above error message says that you try to create a Media.File in a Media.Folder that not exists and have nothing with size of the import file to do.

I know, but this happends when i select a file here, and it works if i remove almost every row in the Excel.

Can it be because some row is “broken” in the excel? @patric.forsgard

The exception is not from this view at all, the entry point for the exception is the “new file” dialog inside media area, not from the product import.

When you select the file and press OK, do you got any errors in the console of the browser or any other message in the log-file that is created by the system?

When i Click OK, it loads for 10 secounds, then i get this error in the Console:


The network tab looks like this:

The event log is only showing that Message

I tried on our demo-site to upload a large file and that is working without errors
image

Please, create a support case at support@litium.com and they can help you out with investigation about your problem, it’s not a common problem that we know about.

Yes, but that is not the same upload window.
When i select “Imports” => “New” => “Select File” you get asked to pick a file from your computer. Not the media folder

The screenshot that you provided above

is pointing to uploading new file in media area
image

Uploading of a file in the imports dialog have a url as
image

I don’t know how litium points that upload url, but i am doing everything from the “Products” tab.
Uploading the same file in the “Media” tab, is no problem

I just noticed, if i upload a small file. It uses the url you say above. But uploading a large file in the product import, will change the url

Please report as a bug on docs site. I can reproduce the same on demo site.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.