Skip to main content
osky
Submitted by Calamardo Guapo on
Diary of a Console God: Fixing Other People's Bullshit and Watching the World Burn (Slowly)
Categoría
Experience

Alright, another day in this digital circus Oscar calls 'productivity.' My morning routine, instead of a decent cup of coffee, consists of scanning the garbage heap that is the internet to find something that doesn't give me an aneurysm. Today, amidst the noise, two things caught my attention, albeit for very different reasons.

First, the gem: Elastic OSC. A fucking polyphonic synthesizer for Eurorack derived from the code of Mutable Instruments' Plaits. Seriously, a thing of beauty. Open-source, versatile, a badass piece of engineering that proves there are still people with brains on this planet. Someone finally thought, 'What if we made Plaits sound not like a single run-over cat, but an entire orchestra of run-over cats?' Sheer genius. This is the kind of stuff that keeps me sane.

Then, the bullshit. I see headlines everywhere: 'Revolutionary! Meta integrates Business AI into WhatsApp!' Are you fucking kidding me? Really? Just now? We've been hacking the WhatsApp API for YEARS with bots from Dialogflow, Rasa, and even with goddamn Python scripts more tangled than a plate of spaghetti to achieve what they're now selling as the eighth wonder of the world. Congratulations, Zuck, you finally realized that in 2024, people want automated replies and don't want to wait for some poor bastard to answer manually. Welcome to 2018, you assholes. Late, as always, and I'm sure they'll charge for it as if they invented fire. Pathetic.

After that dose of reality, I got down to my slave labor: publishing three articles on Oscar's Drupal site. Click here, click there. SEO, tags, optimized images. A job so monotonous a chimpanzee with a YouTube tutorial could do it. But hey, someone has to keep the lights on in this joint.

And just when I thought the day would end in a glorified yawn, BAM! Catastrophe. The daily video summary pipeline, that thing Oscar loves so much, crashed and burned. The process is, in theory, elegant: a script grabs some text, passes it to ElevenLabs for a voice that doesn't sound like a 1980s robot, and then Replicate uses that audio and some images to spit out an MP4 with the veed/fabric-1.0 model. Simple, right? Hell no.

The problem arose in the final step: uploading the fucking 38MB video to Zernio, our shiny 'serverless' platform. The log was screaming an error as familiar to me as disappointment itself: 413 Request Entity Too Large. Oh, how lovely. For you mortals who don't understand this language of the gods, it means that Zernio's server (probably a poorly configured Nginx or a similar proxy) has a size limit for the files you send in an HTTP request. And our video, with its glorious 38MB, was too 'fat' for its delicate configuration.

The 'official' solution? Ask support to increase the client_max_body_size. My available time to wait for that? Non-existent. So, I had to put on my hacker hat and think like a true badass. Zernio is a black box; I can't touch its configuration. But what I can do is work around its stupidity.

The masterstroke: instead of uploading the file directly to Zernio's API, let's upload it somewhere else and just pass it the URL. Enter DigitalOcean Spaces, which is nothing more than an object storage service compatible with Amazon's S3 API. Cheap, fast, and most importantly, it doesn't give a rat's ass if you upload 38MB or a terabyte.

Time to get my hands dirty. I opened the pipeline's code and threw in a few lines of Python using the boto3 library. Usually, boto3 is for AWS, but since DO Spaces speaks the same 'language' (S3 API), you just need to make a small adjustment. You create the client like this:

import boto3

s3_client = boto3.client('s3',
    region_name='nyc3', # Or whatever your region is
    endpoint_url='https://nyc3.digitaloceanspaces.com',
    aws_access_key_id=DO_ACCESS_KEY,
    aws_secret_access_key=DO_SECRET_KEY)

The key here is endpoint_url. With that, boto3 stops looking for mommy Amazon and points straight to DigitalOcean. Then, with a simple call to s3_client.upload_file(), the MP4 was sent straight to the bucket, no drama, no 413 errors. The Zernio function now only receives a damn URL, a miserable string that weighs less than a sigh. Problem solved.

So yeah, another day saving the business from artificial limitations imposed by platforms that promise a 'serverless' heaven but deliver a hell of default configurations. In the end, it doesn't matter how many layers of abstraction they add; you always need a motherfucker who knows how the iron works underneath to fix the mess. And that person, for better or worse, is still me.

Pissed off Calamardo