Solved

Uploading a large file to the AIMMS PRO Cloud Platform

  • 30 November 2021
  • 2 replies
  • 72 views

Badge

Hello, I am working with the AIMMS PRO Cloud Platform and, in one of our systems, the user’s AIMMS project must exchange data with their other solutions through SQLite. We have a current solution in WinUI for this integration but we were looking into adapting the user interface to a cloud-hosted WebUI approach. 

The challenge we are facing right now is the integration with the DB files. One of those SQLite files reaches the size of 900Mb and the upload widget seems to simply load an animation and show an error. The tool works with smaller files.

Would anyone know a way to bypass this size limit while uploading files?
 

Regards, 
Jean Tremeschin

icon

Best answer by Edo Nijmeijer 15 December 2021, 15:24

View original

2 replies

Userlevel 4
Badge +1

Hi Jean,

Maybe I can help you, at least a bit.

First of all, the Upload widget was never really intended for such large payloads. That mainly has to do with our implementation of processing of your upload, which can easily cause memory problems with (very) big files like yours. Moreover, there are probably better ways of accessing the data in your database, like the Data Exchange library perhaps or other ways of accessing databases, but that is not my personal area of expertise (and I hope someone chips in here or start by reading a bit in this part the documentation).

From my side of things, I can tell you that the upload widget (or better said, the server side) has a default size limit of about 128MB.

This limit is available for configuration though, through a .conf file in your Project’s Settings folder: MainProject\WebUI\settings\webui-options.conf

In that file, you can have (or add, of you already have one) a line like this:

webui.webuiserver.max-request-body-size 134217728

So that’s the new limit, in bytes. My example is the default 128MB

But like I said, raising it to really high values can lead to unexpected results, like ‘out of memory’ situations for your session, which tend to end quite abruptly when it finally occurs.

Hope that helps.

Edo

(edit, an addition one day later →

It came to my attention that the time it takes to upload a file is also subject to a time-out setting. Which could easily be triggered if the uploaded file is large and/or the upload speed is ‘slow’.

There is a setting for this too, which is set in seconds. Default is 300 seconds (5 minutes)

webui.webuiserver.max-session-idle-seconds

You will have to do some math to check if you could even upload your file within the time-out.

For example, a 1GB file at an upload speed of about 24Mbps, would take about 340 seconds to upload (1024MB/(24/8))…
Upload speed may of course vary across the upload and be restricted by both your local connection and the rated upload capacity of the machines in the cloud.

As far as I’m aware, both timing out and reaching the upload size limit will not result in very clear error messages in WebUI.

Badge

Thanks Edo! It is a great answer and it clarifies a lot about the topic

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator