---
title: WKExtendedRuntimeSessionErrorCode.exceededResourceLimits
framework: watchkit
role: symbol
role_heading: Case
path: watchkit/wkextendedruntimesessionerrorcode/exceededresourcelimits
---

# WKExtendedRuntimeSessionErrorCode.exceededResourceLimits

The session exceeded its resource limits.

## Declaration

```swift
case exceededResourceLimits
```

## Mentioned in

Using extended runtime sessions

## Discussion

Discussion During an extended runtime session, the system limits your app’s amortized CPU usage over time. If your app exceeds the limits during a 60-second window, the system cancels the session. Monitoring usage-per-minute allows your app to experience brief spikes of CPU usage, as long as the average remains low. When the system cancels your session, it calls your delegate’s extendedRuntimeSession(_:didInvalidateWith:error:) method and passes a WKExtendedRuntimeSessionInvalidationReason.error reason with a WKExtendedRuntimeSessionErrorCode.exceededResourceLimits error.

## See Also

### Error Codes

- [WKExtendedRuntimeSessionErrorCode.unknown](watchkit/wkextendedruntimesessionerrorcode/unknown.md)
- [WKExtendedRuntimeSessionErrorCode.scheduledTooFarInAdvance](watchkit/wkextendedruntimesessionerrorcode/scheduledtoofarinadvance.md)
- [WKExtendedRuntimeSessionErrorCode.mustBeActiveToStartOrSchedule](watchkit/wkextendedruntimesessionerrorcode/mustbeactivetostartorschedule.md)
- [WKExtendedRuntimeSessionErrorCode.notYetStarted](watchkit/wkextendedruntimesessionerrorcode/notyetstarted.md)
- [WKExtendedRuntimeSessionErrorCode.barDisabled](watchkit/wkextendedruntimesessionerrorcode/bardisabled.md)
- [WKExtendedRuntimeSessionErrorCode.notApprovedToStartSession](watchkit/wkextendedruntimesessionerrorcode/notapprovedtostartsession.md)
- [WKExtendedRuntimeSessionErrorCode.notApprovedToSchedule](watchkit/wkextendedruntimesessionerrorcode/notapprovedtoschedule.md)
