Brewskey / spark-protocol

Node.JS module for hosting direct encrypted CoAP socket connections
GNU Lesser General Public License v3.0
9 stars 16 forks source link

HTTP 500 Error on Updating Firmware #138

Closed haeferer closed 5 years ago

haeferer commented 6 years ago

If you first build a SparkProtocol

npm run update-firmware

sometimes (depending on your internet connection, or DOS detection) the process fails with Timeout 500 Errors.

Reason: The Script starts every download at the same time (> 220 of them). So if your internetconnection is not fast enough (or github cools you down because of DOS Attack). Some of them fail

Workaround: Run the command until there is no error left

Note: This does not work very well, if you install spark-protocol as a dependency of spark-server

Solution

i've created a patch to download the file step by step (with a max. amount of parallel downloads)

I will make a PR from https://github.com/keatec/spark-protocol

haeferer commented 6 years ago

134 seems to be the same problem

jlkalberer commented 6 years ago

Ok, sounds good. It should be pretty trivial to batch the downloads.

jlkalberer commented 5 years ago

I've cleaned this up a bit. It should work better now that we use a .env file and filter out existing firmware modules.