Troubleshooting.

Slides:



Advertisements
Similar presentations
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Advertisements

Module 5: Performing Administrative Tasks. Overview Configuration Tasks Routine SQL Server Administrative Tasks Automating Routine Maintenance Tasks Creating.
Hands-On Microsoft Windows Server 2003 Networking Chapter 7 Windows Internet Naming Service.
HTTP HyperText Transfer Protocol Part 3.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Module 13 Automating SQL Server 2008 R2 Management.
Network and Active Directory Performance Monitoring and Troubleshooting NETW4008 Lecture 8.
Building Android Apps with Mobile Services Speaker Name Speaker Title Speaker Company Twitter:
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
Austin code camp 2010 asp.net apps with azure table storage PRESENTED BY CHANDER SHEKHAR DHALL
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
Building Connected Android Apps with Azure Chris Risner Technical Evangelist
Oracle Data Integrator Procedures, Advanced Workflows.
BA372 Stored Procedures and Triggers Lab. What needs to be done to change a customer’s credit limit? Who am I? May I? Do it Log it Display A database.
Module 15 Monitoring SQL Server 2008 R2 with Alerts and Notifications.
37 Copyright © 2007, Oracle. All rights reserved. Module 37: Executing Workflow Processes Siebel 8.0 Essentials.
Module 7: Advanced Application and Web Filtering.
1 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 2: REST Details and Patterns Some.
WINDOWS AZURE MOBILE SERVICES AN INTRODUCTION Bret Stateham Technical Evangelist
RESTful Web Services What is RESTful?
Updates made to latest draft since Herndon Sony Corporation Toshiaki Kojima.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
Using Correlated Tracing to Diagnose Query Level Performance What’s slowing down my app? Jerome Halmans Senior Software Development Engineer Microsoft.
Real-Time Dashboards on Power BI
Module 4: Troubleshooting Web Servers. Overview Use IIS 7.0 troubleshooting features to gather troubleshooting information Use the Runtime Control and.
Manage your projects efficiently and on a high level PROJECT MANAGEMENT SYSTEM Enovatio Projects Efficient project management Creating project plans Increasing.
National College of Science & Information Technology.
SQL Database Management
Building Azure Mobile Apps
Top 10 Entity Framework Features Every Developer Should Know
Autodesk Dev Days 2015 The road ahead DevDays 2015
ASP.NET Programming with C# and SQL Server First Edition
Welcome POS Synchronize Concept 08 Sept 2015.
API Manager for Vendorlink
How to tune your applications before moving your database to Microsoft Azure SQL Database (MASD) OK, you've jumped into your Azure journey by creating.
Azure Mobile Services + Windows Phone 8
Content from Python Docs.
API Security Auditing Be Aware,Be Safe
Module 10: Managing and Monitoring Network Access
Hypertext Transport Protocol
Microsoft Ignite /22/2018 3:27 PM BRK2121
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
OnContact CRM Customer Relationship Management
Ashish Pandit IT Architect, Middleware & Integration Services
Testing REST IPA using POSTMAN
WEB API.
Google App Engine Ying Zou 01/24/2016.
Saravana Kumar CEO/Founder - Kovai Atomic Scope – Product Update.
Let's make a complex dataset simple using Azure Cosmos DB
2/19/2019 9:06 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
REST APIs Maxwell Furman Department of MIS Fox School of Business
Azure Cosmos DB with SQL API .Net SDK
Developing Microsoft Azure Solutions Jump Start
Building production-ready APIs with ASP.NET Core 2.2
Technical Integration Guide
5 Azure Services Every .NET Developer Needs to Know
Server-Side Programming
Partitioning.
Resource Model.
Change Feed.
WCF Data Services and Silverlight
Building Windows Store Apps with Windows Azure Mobile Services
Microsoft Azure Data Catalog
Developing Cosmos DB for the Enterprise
SharePoint 2013 Best Practices
Presentation transcript:

Troubleshooting

Troubleshooting Using HTTP/REST response status codes and headers to diagnose and troubleshoot requests. This module will reference troubleshooting in the context of all Azure Cosmos DB modules and APIs.

Analyzing HTTP Responses Response Status Codes When a request is unsuccessful, Azure Cosmos DB responds using well-defined HTTP status codes that can provide more detail into exactly why a specific request failed. Response Headers Azure Cosmos DB uses a variety of HTTP headers to offer insight into the result of requests, error conditions, and useful metadata to perform actions such as: Resume request Measure RU/s charge associated with request Access newly created resource directly. HTTP response codes 2xx Success 4xx Client Errors 5xx Server Errors

Errors- Exceptions handling SQL API * Retry all  < 400 errors * For mutation(Write/update) - ensure idempotency is taken care of – example 449 * For 503 error or Transport error(socket closed/channel is closed/service unavailable) – please have a loop of retry with exponential back-off and random jitter. * if inserting/updating data in constraint of time (say from azure function/stream job – ensure you have dead letter queue or retry queue) * Create alerts in Azure Monitor to get faster notification  Other API * Use Native error handling

Monitoring Client Capture activity id, request charge, exception (error code/substatus code/stacktrace), query exec stats if any every operation. You can also record response size/request size just in case When logged into APIM like AppInsight – you can quickly raise alerts and look at issues Use Azure Monitor to track response/error codes/ RU provisoned and raising alerts Use Diagnostic log for immutable log of control plane, data plane and query log for SQL API

Response Status Codes 200 OK 201 Created 204 No Content Meaning 200 OK GET, PUT or POST operation was successful 201 Created Resource created successfully using a POST operation 204 No Content Resource deleted successfully using a DELETE operation 401 Unauthorized Invalid Authorization header 403 Forbidden Authorization token expired Resource quota reached when attempting to create a document Stored Procedure, Trigger or UDF is blacklisted from executed 409 Request Timeout Stored Procedure, Trigger or UDF exceeded maximum execution time

Response Status Codes 409 Conflict 412 Precondition Failure Header Value 409 Conflict The item Id for a PUT or POST operation conflicts with an existing item 412 Precondition Failure The specified eTag is different from the version on the server (optimistic concurrency error) 413 Entity Too Large The item size exceeds maximum allowable document size of 2MB 429 Too Many Requests Container has exceeded provisioned throughput limit 449 Retry With Transient error has occurred, safe to retry 50x Server-side error. If effort persists, contact support

Response Headers x-ms-activity-id x-ms-serviceversion Value x-ms-activity-id Unique identifier for the operation x-ms-serviceversion Service Version used for request/response x-ms-schemaversion Schema Version used for request/response x-ms-item-count In a query (or read-feed), the number of items returned x-ms-alt-content-path REST URI to access resource using user-supplied IDs etag The same value as the _etag property of the requested item

Response Headers x-ms-continuation x-ms-session-token Value x-ms-continuation Token returned if a query (or read-feed) has more results and is resubmitted by clients as a request header to resume execution x-ms-session-token Used to maintain session consistency. Clients much echo this as a request header in subsequent operations to the same container x-ms-request-charge Number of normalized RU/s for the operation x-ms-resource-quota Allotted quota for the specified resource in the account x-ms-resource-usage Current usage count of the specified resource in the account x-ms-retry-after-ms If rate limited, the number of milliseconds to wait before retrying the operation Per Andrew, need to include “intro the standard HTTP response code convention of 2xx is success, 4xx is client error, 5xx is server error.”

Viewing REST API Response Metadata

Identifying Rate Limiting HTTP Response Status Code A rate limited request will return a HTTP status code of 429 (Too Many Requests). This response indicates that the container has exceeded provisioned throughput limit. HTTP Response HEader A rate limited request will also have a x-ms-retry-after-ms header. This header gives the number of milliseconds your application should wait before retrying the current request. Automatic Retry On Throttle The SDK automatically retries any throttled requests. This can potentially create a long-running client-side method that is attempting to retry throttled requests. https://httpstatuses.com/429

Logging What Is Logged By Azure Diagnostic Logs: All Authenticated Backend Requests Across All Protocols and API’s Includes Failed Requests Database Operations Includes CRUD Operations On All Resources Account Key Operations Unauthenticated Requests Requests That Result In A 401 Response

Viewing Logs in Log Analytics Enable Logging Diagnostic Logs for Azure Services are opt-in. You should first enable logging (using the Portal, CLI or PowerShell). Logs take, on average, about two hours to be made available. Log Analytics If you selected the Send to Log Analytics option when you turned on diagnostic logging, diagnostic data from your collection is forwarded to Log Analytics. From within the Log Analytics portal experience, you can: Search logs using the expanded Log Analytics query language Visualize the results of a query as a graph Pin a graph visualization of a query to your Azure portal dashboard

Viewing Logs in Log Analytics

Hands-On Exercise Troubleshooting Failed and RATE LIMITED Requests Tasks: Simulate a Usage Spike in Requests View Response Metadata Third exercise task Hands-On Exercise Troubleshooting Failed and RATE LIMITED Requests