Closed Thialala closed 6 years ago
When you say it stops what do you mean exactly? Looks like there's multiple ways for the Feed function to stop (ex: you're hitting some exception). You'll need to figure out what path it's taking that causes it to stop. If you need help trying to get your tracing or debugging working in that environment, let us know what you're running into there. You could also consider utilizing service fabric health reports to help track where processing is stopping and why: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-report-health
@masnider , thank you for your answer. You were right, I'm hitting an exception:
{"ClassName":"System.AggregateException","Message":"One or more errors occurred.","Data":null,"InnerException":{"ClassName":"System.IO.IOException","Message":"Unable to read data from the transport connection: The connection was closed.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.get_EndOfStream()
at BackgroundService.<Feed>d__2.MoveNext() in C:\\........\\BackgroundService.cs:line 145
On my LocalDevCluster, I have no connection closed and I'm able to recover the entire stream from another service running in the cluster. However, once deployed, I have this error.
Any clue ?
Thanks!
@Thialala - sorry no idea why that might be happening off the top of my head. Could be lots of things. Something about your use of that SQL reader doesn't work in your real environment. Could be things like the address of the other service is incorrect, or there's firewalls or other things blocking the communication. For now we're going to close this down as it's probably not related to SF, but if you're stuck and you've confirmed that the connectivity is working as you'd expect and that the addresses of everyting is correct, then please reopen things.
I had an issue with background operation stopping with no error / exception. I have a SF app with two services :
The FrontService receives the request and directly forwards it to the BackgroundService. This latter service calls another service in the cluster to receive a csv file stream from Azure Datalake and split it and insert it in a table in Azure SQL Database.
When I test it locally on my Dev Cluster, it works fine and insert the 1,300,00 lines of the file in the table in around 3 minutes. When I publish it to the Azure Service Fabric Cluster, it only inserts 150000 lines and stops.
I cannot provide logs because I couldn't enable Debugging nor Streaming Tracing. The cluster is running on a VNET with NSG and an internal load balancer.
Microsoft.ServiceFabric ==> Version="6.1.472" Microsoft.ServiceFabric.* ==> Version="3.0.472"
Azure Service Fabric Version : 6.1.480.9494
Here is the code of the FrontService:
Here is the code of the BackgroundService :
Here is the code of the interface IDatabaseFeeder :