Upload Web Archive fails due to 4MB upload limit

Hi,

I followed the first touch example and finally reached the last step on "Publish the application". The build seems to be successful but in the end Volt MX Iris prints the following console log:

---❏ Upload web archive ---
Uploading client binary C:\Users\julianmosen\Iris\workspace\temp\FirstTouch\build\wap\build\FirstTouch.zip
16:15:43.112 [main] ERROR com.kony.console.tools.api.MobileFabricException - HTTP POST on http://foundry.mymxgo.com:80/workspace/100000002/api/v1/ws/100000002/apps/efa81374-302d-4eee-adc5-b6294062ce92/clientbins/create failed for [Upload app client binary] with status 400. Details - {"domain":"WAAS","code":-48,"message":"File size should be less than 4MB.","details":{"message":"File size should be less than 4MB.","errcode":-48,"errmsg":"File size should be less than 4MB."},"httpstatus":"BAD_REQUEST","httpStatusCode":400}
ERROR mf upload error: ERROR: HTTP POST on http://foundry.mymxgo.com:80/workspace/100000002/api/v1/ws/100000002/apps/efa81374-302d-4eee-adc5-b6294062ce92/clientbins/create failed for [Upload app client binary] with status 400. Details - {"domain":"WAAS","code":-48,"message":"File size should be less than 4MB.","details":{"message":"File size should be less than 4MB.","errcode":-48,"errmsg":"File size should be less than 4MB."},"httpstatus":"BAD_REQUEST","httpStatusCode":400}
ERROR Build Failed!
- CustomError: Error while uploading web client binary. ERROR: HTTP POST on http://foundry.mymxgo.com:80/workspace/100000002/api/v1/ws/100000002/apps/efa81374-302d-4eee-adc5-b6294062ce92/clientbins/create failed for [Upload app client binary] with status 400. Details - {"domain":"WAAS","code":-48,"message":"File size should be less than 4MB.","details":{"message":"File size should be less than 4MB.","errcode":-48,"errmsg":"File size should be less than 4MB."},"httpstatus":"BAD_REQUEST","httpStatusCode":400}
at C:\Program Files\Volt MX Iris\kbuild\serviceconfig\WebClientUploadTask.js:1:2454
at new Promise ()
at WebClientUploadTask.execute (C:\Program Files\Volt MX Iris\kbuild\serviceconfig\WebClientUploadTask.js:1:552)
at C:\Program Files\Volt MX Iris\kbuild\serviceconfig\servicePackager.js:1:1458
at new Promise ()
at ns.publishAssets (C:\Program Files\Volt MX Iris\kbuild\serviceconfig\servicePackager.js:1:1409)
at C:\Program Files\Volt MX Iris\kbuild\BuildManager.js:1:5439
at new Promise ()
at C:\Program Files\Volt MX Iris\kbuild\BuildManager.js:1:5157
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 67
}
Build and Publish Web Failed

Is there any upload limit that has to be configured? The MX Volt forum points me to look at the MySQL server and the variable --max_allowed_packet value that might limit the upload to 4MB. Might this be the problem?

Best Julian

Hi Julian

The issues with mysql that you have been having seem to have no end in fun! I'm sorry about this. If you use the bitnami version of the mysql Helm chart that we document, the upload limit is set to 16 MB. When I had you use that other mysql-5.7 script, that installed version 5.7 that by default has a 4 MB limit. From what I have seen, you can use the following procedure to bump the limit.



1. Get the mysql pod name:

kubectl get pods -n mxgo

You should see your pods and something like `mysql-deployment-9c69d5f6c-lb2pt` for the mysql pod.

2. Exec into the pod and use mysql command line to increase the max_allowed_packet parameter:

kubectl exec -it mysql-deployment-9c69d5f6c-lb2pt -n mxgo -- bash



3. You should then be put into a shell prompt within the mysql container. Start a mysql interactive session like this:

mysql -u root -p

you will be prompted for the password. It is "Password123!" without the quotes.

4. Run the following command to get the current value:

show variables like 'max_allowed_packet';

5. Run the following command to update the max_allowed_packet size to 32 MB:

set global max_allowed_packet=33554432;

6. If you were to run the `show variables` command again the updated value is not reflected. This is normal. Exit the mysql command prompt and exit out of the interactive session you have in the pod.

exit;

and then again

exit

you should be returned back to your original shell command prompt.

I believe this should work for you. Note that this change is not persistent - - if the mysql pod gets restarted you will need to run this update again. Let me know how you make out with this.

For reference, this was from my brief test:

$ kubectl exec -it mysql-deployment-9c69d5f6c-lb2pt -n mxgo -- bash
bash-4.2# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.42 MySQL Community Server (GPL)

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show variables like ‘max_allowed_packet’;
±-------------------±--------+
| Variable_name | Value |
±-------------------±--------+
| max_allowed_packet | 4194304 |
±-------------------±--------+
1 row in set (0.01 sec)

mysql> set global max_allowed_packet=33554432;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye
bash-4.2#

Hi Jay,

thanks for the mysql commands. I followed your instructions and now the upload was successful. But I had to flush all tables with the following command inside of the mysql container:

mysqladmin refresh -p

Best Julian

Thanks for the update and determining that the refresh was required. I'll update my notes on this. We don't plan on documenting or supporting the use of the mysql-5.7 script but I think this should get you through EA without issue. Let us know if you face other problems with it and we'll do our best to work through them with you.

Jay