Fix production memory exhaustion incident and improve polaroid animations #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR addresses production incident INC0010019 (Severity 1) which caused 500 errors and service degradation in the Azure Container Apps environment, and includes requested improvements to the landing page polaroid animations.
Critical Backend Fix
The Problem
The application was experiencing repeated
System.OutOfMemoryException
errors in production, causing:Root Cause: The
AReallyExpensiveOperation()
method inListingEndpoints.cs
was allocating approximately 1GB of memory (10 iterations × 100MB) when theERRORS
configuration flag was enabled. This operation was intended to simulate high memory load for testing error handling in production, but it caused actual OutOfMemoryException errors under concurrent load.The Solution
Replaced the memory-intensive operation with a no-op while maintaining backward compatibility with the
ERRORS
flag:This minimal change eliminates the memory exhaustion issue while preserving the code structure and flag behavior.
Frontend Polaroid Animation Improvements
Updated the floating polaroid animations on the landing page to be significantly slower and smoother:
Animation Speed
Movement Range
Reduced the movement range for more subtle animations:
Hover Behavior
Verified that hover effects remain static (no motion), only applying subtle highlight filters:
Testing & Validation
Impact
Fixes #[incident-number]
Original prompt
This section details on the original issue you should resolve
<issue_title>Production incident: 500 errors/non-responsiveness in Container App — findings, mitigation, and fixes</issue_title>
<issue_description>Incident: INC0010019 (Severity 1)
Service: Azure Container Apps — octopetsapi (rg-octopets-v2, sub ca5ce512-88e1-44b1-97c6-22caf84fb2b0)
Timeline (UTC):
Diagnostics summary:
Hypotheses and likely root cause:
Recommended code fixes:
IaC and configuration observations (drift):
Actionable tasks:
Acceptance criteria:
Note: If assignment to specific owners is required, please route to repo maintainers. Including owners familiar with ListingEndpoints.cs is recommended.
This issue was created by srea-octopets-007--b51b793d
Tracked by the SRE agent [here](https://portal.azure.com/?feature.customPortal=false&feature.canmodifystamps=true&feature.fastmani...
Fixes #7
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.