msgraph-sdk-php icon indicating copy to clipboard operation
msgraph-sdk-php copied to clipboard

503 Errors with Large/Malformed Event

Open Trynomial-Solutions opened this issue 3 years ago • 2 comments

Hello everyone,

My script kept receiving 503 Service Unavailable errors from the Graph API when using createCollectionRequest()->getPage() to retrieve calendar events. The code and debugging steps are described in detail on SO, but after much investigation I discovered that the error was because of a large/malformed event on my calendar. However, I was able to successfully retrieve the event details using Microsoft Graph Explorer, so there may be something that needs to be caught in this library.

Unfortunately, I cannot upload the JSON from the event because it contains a large amount of private information. I believe the cause of the error is that the event had 16536 attendees listed. Body content is standard HTML. I'm happy to provide any other specific details/data fields that you need from this event to help track down the issue.

Thank you for creating this excellent library! AB#9224

Trynomial-Solutions avatar Apr 30 '21 03:04 Trynomial-Solutions

Can you share with us the form of the request you make on Graph Explorer versus the form you used with this library? Also, in the 503 response, there should be a requestId and time stamp, can you provide that to us.

Can you compare the HTTP request (no response needed) that is issued with Graph Explorer with the HTTP request issued from this library and share the diff? Make sure you review and sanitize the auth header and URL.

MIchaelMainer avatar May 20 '21 15:05 MIchaelMainer

Thank you for the response. I have since deleted the large event in order to continue using my script, so I cannot reproduce the error. However I used an identical request on graph explorer and in my code, it looked like this https://graph.microsoft.com/v1.0/me/calendarView?$filter=isOrganizer+eq+false&$orderby=start/dateTime&startdatetime=2021-04-19T00:00:01-04:00&enddatetime=2021-07-28T00:00:01-04:00&$top=10&$skip=40

Here is one of the responses I received earlier (edited)

reasonPhrase => Service Unavailable statusCode => 503 headers => Date => Thu, 29 Apr 2021 15:20:04 GMT Transfer-Encoding => chunked Strict-Transport-Security => max-age=31536000 request-id => b9ef0347-19ce-485b-9fe3-bff0dd5d404f client-request-id => b9ef0347-19ce-485b-9fe3-bff0dd5d404f x-ms-ags-diagnostic => {"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"3","ScaleUnit":"004","RoleInstance":"CH01EPF00003ED2"}

Trynomial-Solutions avatar May 25 '21 01:05 Trynomial-Solutions

Unable to reproduce. 503s occur on the API service layer. The cause of error is outside the scope of the SDK. If this recurs please reopen the issue.

Ndiritu avatar Oct 06 '22 06:10 Ndiritu