# Is there a max size on the product import?

**URL:** <https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540>\
**Category:** Questions\
**Created:** [June 17, 2020, 7:30am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540 "2020-06-17T07:30:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [June 17, 2020, 7:30am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/1 "2020-06-17T07:30:31Z")

</div>

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, Action`1 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, TaskCompletionSource`1 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, IReadOnlyDictionary`2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 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 \_, ValueTuple`2 parameters) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementation[TState,TResult](Func`3 operation, Func`3 verifySucceeded, TState state) at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 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

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 17, 2020, 7:33am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/2 "2020-06-17T07:33:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [June 17, 2020, 7:38am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/3 "2020-06-17T07:38:56Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/78eaa73c9c5a631d12d05b42ce3bbadaeec65c9e.png)

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

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 17, 2020, 7:42am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/4 "2020-06-17T07:42:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [June 17, 2020, 7:46am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/5 "2020-06-17T07:46:39Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/9c7b204f3f5e37c0ee54b547f2f20160e0aa85e7.png)  
The network tab looks like this:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/273ff4e5e2265d74975cd98308f919e8b60c5194.png)

The event log is only showing that Message

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 17, 2020, 7:58am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/6 "2020-06-17T07:58:09Z")

</div>

I tried on our demo-site to upload a large file and that is working without errors  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/0c823e06901270ae26e91f056d918e003a30e59d.png)

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

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [June 17, 2020, 7:59am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/7 "2020-06-17T07:59:53Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/cf4d52ff927837c79481ee27b95a5ad2aa86ee23.png)

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 17, 2020, 8:04am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/8 "2020-06-17T08:04:55Z")

</div>

The screenshot that you provided above

> [@Ericsj11](#):
>
> ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/273ff4e5e2265d74975cd98308f919e8b60c5194.png)
> 
> image1518×924 98.9 KB

is pointing to uploading new file in media area  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/e5497dd20c15823791d5016bad54cf257dd1ba1f.png)

Uploading of a file in the imports dialog have a url as  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/05e0f27f08f6ad78a0f9e7ee743726c2c50a8cc8.png)

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [June 17, 2020, 8:08am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/9 "2020-06-17T08:08:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [June 17, 2020, 8:10am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/10 "2020-06-17T08:10:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [June 17, 2020, 8:12am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/11 "2020-06-17T08:12:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [July 15, 2020, 8:13am UTC](https://forum.litium.com/t/is-there-a-max-size-on-the-product-import/1540/12 "2020-07-15T08:13:00Z")

</div>

Closed on July 15, 2020, 8:13am UTC

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