I am using Spark Java for writing the REST API servies. Spark is a neat web microframework which kinda reminds me of good-old Python Flask. Problem Some of my HTTP requests I have to send are humongous. Sometimes in megabytes. The underlying Jetty server was throwing "Form too large" exception because, POST requests’ body size exceeds what is supported. The default maximum POST request size is 2 MiB. Now, Spark does not offer any direct ways to configure the settings of the underlying Jetty server.
The Bug 🐛 I faced a very weird bug lately. I have to split a disk into multiple equally sized blocks and generate hashes of those blocks. I wrote this module three months before and all my unit test cases always pass too. One fine morning, all of a sudden the the unit test started failing. Even more weird, when I ran it again, it started passing. Once in say, 20 times, the test was failing.