We have been implementing SSE in production since May 10. We currently use a redis setup for it. Since then we have noticed intermittent issues with servers locking up, not responding and being taken out of our load balancer. Often the only recourse is rebooting the server.
Event logs show nothing useful except a warning for app pools getting shutdown. We did notice 1000s of errors start coming in via bugsnag as mentioned Here. There is no other useful logging or information we can pull from servers that gives us any clues.
In the last 2 days it’s gone from occasional to not being able to keep a server up. Within 5 min of bringing a server online it locks up. After basically throwing darts we disabled sending SSE and everything calmed down instantly. Subscriptions are still being made etc, just we are not sending out messages. This is about all we have to go on right now.
We typically have 2 m5.large windows servers running. There are two subscription channels that run with nothing additional customized in the sse startup. We notify via direct to userId only. A sample of that payload is below.
The IServerEvents is injected into the service class and is basically the following function that is called to send messages
private void SendServerProposalUpdateMessage(int proposalId, UserInfo userInfo)
{
var httpResult = Get(new ProposalDetailRequest() { ProposalId = proposalId});
serverEvents.NotifyUserId(userInfo.Id.ToString(), httpResult.Response, ProposalChannelName);
}
Any suggestions or thoughts would be more than helpful at this point.
Payload:
cmd.ProposalDetailResponse {"id":79169,"name":"Image test","total":6040.7920,"currentVersion":1,"createdDate":"2017-07-25T17:21:58.0700000","modifiedDate":"2018-05-22T00:21:42.9186820","number":117,"status":"Draft","discount":100,"discountAmount":100,"discountType":"Fixed","clientLastOpenedDate":"2018-05-20T07:50:00.6677730","hideItemPrices":false,"hideModelNumbers":false,"hideImages":false,"hideLaborPrices":false,"hideRoomTotals":false,"hideLaborTotal":false,"hideCompanyAddress":false,"paymentSchedule":"PAYMENT SCHEDULE\r\n","projectTerms":"PROJECT TERMS","previewUrl":"//xxxxxxxxxx/79169/014d-4ec9-b5c8-2a55d3a81b1b?Preview=true","userModifiedFirstName":"Amber","userModifiedLastName":"Cactus","proposalClientId":49918,"clientName":"Reed","stateId":10,"stateName":"Florida","countryId":1,"countryName":"United States","dealerId":7731,"dealerUserName":"Amber Cactus","dealerEmail":"test@mailinator.com","dealerWebSite":"www.xxxxx.com","dealerAddress1":"2345 fake Road","dealerAddress2":"Suite AB3","dealerCity":"Greensboro","dealerStateId":10,"dealerStateName":"North Carolina","dealerCountryId":1,"dealerCountryName":"United States","dealerZip":"27409","dealerCompanyPhone":"(800) 488-5555","companyName":"Amy Test ","aboutUs":"<p><span style=\"font-size: 30px\">ABOUT US</span></p>","logoImageAssetId":9412615,"cost":0,"rooms":[{"parts":[{"partRoomId":2193016,"partId":2001501,"model":"XBR55X900E","description":"Sony Bravia XBR-55X900E 55" class (54.6" diag) 4K HDR Ultra HD TV","supplierId":1574,"sellPrice":1915.2000,"cost":957.6000,"quantity":2,"imageAssetId":6275101,"imageUrl":"https://res.cloudinary.com/c_limit,w_132,h_72,d_emptyPart.png/v63662545303/xxxxxxx/Part/6275101","brandName":"Sony","isCatalogModelName":true,"isInStockStatus":""}],"labors":[],"miscItems":[],"description":"<p>Area description modified again</p>","total":3830.4000,"id":352145,"name":"copy"},{"parts":[{"partRoomId":2193025,"partId":2001501,"model":"XBR55X900E","description":"Sony Bravia XBR-55X900E 55" class (54.6" diag) 4K HDR Ultra HD TV","supplierId":1574,"sellPrice":1915.2000,"cost":957.6000,"quantity":1,"imageAssetId":6275101,"imageUrl":"https://res.cloudinary.com/c_limit,w_132,h_72,d_emptyPart.png/v63662545303/xxxxxxx/Part/6275101","brandName":"Sony","isCatalogModelName":true,"isInStockStatus":""}],"labors":[],"miscItems":[],"total":1915.2000,"id":529179,"name":"Copied"}],"tax":7,"taxTypes":["Labor","Parts","None"],"taxAmount":395.1920,"partTotal":5745.6000,"laborTotal":0,"profitTotal":2772.8000,"profitPercent":49,"profitPartTotal":2772.8000,"profitPartPercent":49,"profitLaborTotal":0,"profitLaborPercent":0,"totalQuantity":3,"coverImageAssetId":9412509,"aboutImageAssetId":6915641,"emailToClient":"{\"defaultMessage\":\"Hi there,\\r\\n\\r\\nI've completed your proposal, simply click below to view a web-based version. Let me know if you have any questions!\\r\\n\\r\\nAmy B\\r\\n\"}","histories":[{"id":401186,"proposalVersion":0,"userName":"Amber Cactus","createdDate":"07-26-17 (01:21 am )","action":"Proposal Created","actionValue":"Created","notes":[]},{"id":783278,"proposalVersion":0,"userName":"Reed","createdDate":"05-20-18 (03:49 pm )","action":"Proposal Opened","actionValue":"OpenedByClient","notes":[]},{"id":783279,"proposalVersion":0,"userName":"Reed","createdDate":"05-20-18 (03:49 pm )","action":"Proposal Opened","actionValue":"OpenedByClient","notes":[]},{"id":783280,"proposalVersion":0,"userName":"Reed","createdDate":"05-20-18 (03:50 pm )","action":"Proposal Opened","actionValue":"OpenedByClient","notes":[]}],"isPreview":false}