Urgent.News

What's breaking now, across thousands of outlets.

Tech

Processing Image Thumbnails Before Upload: Python Timeout Budgets for Game Assets

Short answer: processing image thumbnails times out before upload when decode and resize consume the request budget; measure those phases separately, keep game assets private, and move resizing to a worker. A thumbnail upload timeout is usually diagnosed at the wrong boundary. The storage request may be slow, but the larger delay is often spent decoding a large source image, resizing it…

Processing image thumbnails before upload can time out due to decode and resize operations consuming the request budget. To address this, measure the decode, transform, and upload phases separately. Keep game assets private and perform resizing in a worker. The decision between access control and delivery simplicity is crucial. Public objects are easy to display but should not be the default for unreleased game art or moderated content.

Use a private object with a short-lived signed read to avoid turning storage into an accidental publishing system. The timeout is shaped by retained bytes, so measuring those phases helps identify the bottleneck. Measure both decode and transform phases, as increasing the storage timeout will not solve the issue if upload time is the problem.

Instrument both paths before making any changes. A worker that finishes a resize just as the request deadline expires needs to be handled with care, as it may lead to wasted CPU and ambiguous object states. Measure the phases to determine whether the issue is with the worker or the storage client. After measuring, decide whether to retain the original object for re-rendering, moderation appeal, or audit purposes, or delete it explicitly.

If deletion is chosen, make the decision explicit to avoid future problems with crop removal. The upload boundary should own image work, while storage should own durable bytes. Mixing these responsibilities can lead to ambiguous job states. Give each phase its own deadline and record a request identifier beside the asset identifier.

Adjust the upload boundary threshold based on workload-specific factors such as source dimensions, encoded format, worker memory, and network behavior. Keep sources and derivatives private by default, with an ACL setting stored in the storage interface. Provide a short-lived signed URL for permitted reads, rather than a permanently public object URL.

A browser direct-upload path is acceptable only after checking CORS ownership and policy. Include a deterministic object key or application job record in the write retry process to handle at-least-once semantics.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

15 Common Shopify Problems and How to Fix Them (Beginner Guide)

Originally published on CodingCush . Almost every new Shopify store hits the same handful of problems: products that refuse to appear, a checkout that sulks, a domain stuck on "pending", a password…

  • Store missing from Google search results; check indexing status
  • Products not displaying; ensure active status and correct collection
  • Billing issues causing unavailable store message; review Settings → Billing

Catch risky SQL migrations in pull requests before they lock production

Most migration incidents aren't exotic: a DROP COLUMN that an old app instance still reads, an ALTER COLUMN ... SET NOT NULL that scans a 200-million-row table, a CREATE INDEX without CONCURRENTLY…

  • MigrationGuard plugin inspects migration SQL in pull requests
  • Highlights risky lines and offers safer alternatives
  • Halts job if risk level is high or critical

Ci/Cd Pipeline Design: Checklist for Teams

A reliable CI/CD pipeline should do more than automate builds and deployments. It should help teams detect defects early, enforce security controls, release consistent artifacts, and recover quickly…

  • Pipeline should have clear, documented path from code changes to releases
  • Build quality and artifacts must be reproducible, identifiable, and secure
  • Security controls, including dependency vulnerability scans, must be integrated

More from Thursday 29 October →